pub struct AuthorizationError {
sid: SourceId,
default_registry: Option<String>,
pub login_url: Option<Url>,
reason: AuthorizationErrorReason,
display_token_env_help: bool,
}
Expand description
An authorization error from accessing a registry.
Fields§
§sid: SourceId
Url that was attempted
default_registry: Option<String>
The registry.default
config value.
login_url: Option<Url>
Url where the user could log in.
reason: AuthorizationErrorReason
Specific reason indicating what failed
display_token_env_help: bool
Should the _TOKEN environment variable name be included when displaying this error?
Implementations§
source§impl AuthorizationError
impl AuthorizationError
pub fn new( gctx: &GlobalContext, sid: SourceId, login_url: Option<Url>, reason: AuthorizationErrorReason, ) -> CargoResult<Self>
Trait Implementations§
source§impl Debug for AuthorizationError
impl Debug for AuthorizationError
source§impl Display for AuthorizationError
impl Display for AuthorizationError
source§impl Error for AuthorizationError
impl Error for AuthorizationError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AuthorizationError
impl RefUnwindSafe for AuthorizationError
impl Send for AuthorizationError
impl Sync for AuthorizationError
impl Unpin for AuthorizationError
impl UnwindSafe for AuthorizationError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 128 bytes