Skip to main content

BrokerError

Enum BrokerError 

Source
pub enum BrokerError {
Show 21 variants NotSignedIn(String), Reauthorize, Blocked, InstallNotApproved(String), NotLive(String), NotConnected, UserMismatch { current: GithubUser, new: GithubUser, }, Unavailable(String), NotLinked, LinkStale, RepositoryNotVisible(String), PermissionNotAllowed(String), BadRequest(String), NotConfigured, InstallSuspended, PermissionNotGranted(String), GithubRejected, InstallationNotVisible, StateInvalid, InstallationTooLarge, Other { status: u16, error: String, },
}
Expand description

Why a broker call gave no answer. The variants are what the desktop does next, not what the broker said.

Variants§

§

NotSignedIn(String)

There is no AgentMux Cloud sign-in (or this install has no key yet).

§

Reauthorize

GitHub no longer accepts this grant: connect again.

§

Blocked

An operator blocked this account’s GitHub grant.

§

InstallNotApproved(String)

The broker doesn’t know this install, or it isn’t approved: sign in and approve it in the Console.

§

NotLive(String)

The grant was revoked or is otherwise not live (status is the broker’s word for it).

§

NotConnected

This account has no GitHub grant.

§

UserMismatch

The account is connected as another GitHub user. Ask, then connect again with replace.

Fields

§current: GithubUser
§

Unavailable(String)

GitHub or the broker is briefly unavailable.

§

NotLinked

The installation isn’t linked to this account (or its link was revoked).

§

LinkStale

The link wasn’t verified lately: present a fresh user token to links/revalidate, then ask again.

§

RepositoryNotVisible(String)

A requested repository is outside what this account can see in the installation.

§

PermissionNotAllowed(String)

A requested permission is above what the App may give.

§

BadRequest(String)

The broker refused the request as malformed: a bug here, not something to retry.

§

NotConfigured

The broker isn’t set up to mint yet.

§

InstallSuspended

The installation is suspended on GitHub.

§

PermissionNotGranted(String)

The installation hasn’t accepted a permission the App asks for: its owner accepts it on GitHub.

§

GithubRejected

GitHub refused the broker’s request for the token.

§

InstallationNotVisible

The installation isn’t one this person’s own GitHub sign-in can see (it may be another person’s, or access was lost).

§

StateInvalid

The install state was used, expired or unknown: start the install again.

§

InstallationTooLarge

The installation shows more repositories than AgentMux Cloud takes.

§

Other

Anything else: the status and the broker’s error code.

Fields

§status: u16
§error: String

Implementations§

Source§

impl BrokerError

Source

pub fn needs_sign_in(&self) -> bool

Whether signing in to AgentMux Cloud is what fixes it. The other NotSignedIn reasons (“not running yet”, “the key can’t be read”) are not.

Trait Implementations§

Source§

impl Clone for BrokerError

Source§

fn clone(&self) -> BrokerError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BrokerError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for BrokerError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for BrokerError

Source§

impl From<BrokerError> for TokenError

Source§

fn from(e: BrokerError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for BrokerError

Source§

fn eq(&self, other: &BrokerError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BrokerError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more