pub struct PlatformError {
pub http_status: u16,
pub code: i64,
pub message: String,
pub reason: String,
pub missing_terms: Vec<TermsDocument>,
}Expand description
A non-2xx answer from the platform API.
Fields§
§http_status: u16The response status.
code: i64The gRPC status code the gateway reports (7 = permission denied, 9 = failed precondition).
message: String§reason: StringThe machine-readable reason, when the service gives one.
missing_terms: Vec<TermsDocument>Set when the call was refused because the organization has not accepted these documents.
Implementations§
Source§impl PlatformError
impl PlatformError
Sourcepub fn github_link_required(&self) -> bool
pub fn github_link_required(&self) -> bool
The organization has to link a GitHub account first.
Sourcepub fn github_app_not_installed(&self) -> bool
pub fn github_app_not_installed(&self) -> bool
The Chainguard GitHub App is not installed on the GitHub account.
Sourcepub fn github_already_linked(&self) -> bool
pub fn github_already_linked(&self) -> bool
The GitHub account is linked to another Chainguard organization.
Trait Implementations§
Source§impl Clone for PlatformError
impl Clone for PlatformError
Source§fn clone(&self) -> PlatformError
fn clone(&self) -> PlatformError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlatformError
impl Debug for PlatformError
Source§impl Default for PlatformError
impl Default for PlatformError
Source§fn default() -> PlatformError
fn default() -> PlatformError
Returns the “default value” for a type. Read more
Source§impl Display for PlatformError
impl Display for PlatformError
Source§impl Error for PlatformError
impl Error for PlatformError
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 PlatformError
impl RefUnwindSafe for PlatformError
impl Send for PlatformError
impl Sync for PlatformError
impl Unpin for PlatformError
impl UnsafeUnpin for PlatformError
impl UnwindSafe for PlatformError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].