Skip to main content

HiveError

Enum HiveError 

Source
pub enum HiveError {
Show 24 variants Offline(String), NotConnected, Unauthorized, PlanRequired(Box<PlanNeed>), InstanceLimit { limit: Option<u64>, used: Option<u64>, }, QuotaExceeded(Box<Quota>), PolicyDenied(PolicyDenial), LeaseLapsed, Revoked(Revocation), Forbidden, Vetoed, UploadDisabled(HiveUploadKind), NotFound, Conflict { expected: Option<u64>, actual: Option<u64>, }, ScreeningBlocked, UpgradeRequired { min: Option<String>, }, RateLimited { retry_after: Option<u64>, }, DeviceFlow(String), Protocol(String), Config(String), Local(String), Refused(String), Task { refusal: TaskRefusal, number: Option<u64>, detail: Option<String>, }, Server { status: u16, code: String, },
}

Variants§

§

Offline(String)

Hive could not be reached (DNS, connect, TLS, timeout, reset).

§

NotConnected

The instance is not enrolled on this machine.

§

Unauthorized

The service refused the instance’s credentials.

§

PlanRequired(Box<PlanNeed>)

402 plan_required: the plan lacks a feature (C0 2.x names it), or, from a 1.x Hive that names none, Hive itself (an engine seat).

§

InstanceLimit

Every instance seat of the organization is taken.

Fields

§limit: Option<u64>
§used: Option<u64>
§

QuotaExceeded(Box<Quota>)

A Release B quota is used up (409/429 quota_exceeded, Hive API §8.1). Nothing is charged; monthly quotas are waited out (the outbox keeps local work), counted ones need a person.

§

PolicyDenied(PolicyDenial)

Hive’ own enforcement of a policy member refused (403 policy_denied, API §7.2). Never retried until the policy changes.

§

LeaseLapsed

The lease is past grace_until; reconnect.

§

Revoked(Revocation)

A workspace admin revoked this instance (401 instance_revoked, C0 2.0 E12). Recorded locally; no Hive call is made until a new connect (fail closed, never retried).

§

Forbidden

The lease lacks the right this request needs.

§

Vetoed

An organization veto bars this lease or handoff (forbidden_right, reason: vetoed; C5c). Never retried until the veto is lifted.

§

UploadDisabled(HiveUploadKind)

The organization switched this upload off; stop it and drop its queue until a lease allows it again (never retried).

§

NotFound

§

Conflict

Fields

§expected: Option<u64>
§actual: Option<u64>
§

ScreeningBlocked

§

UpgradeRequired

Fields

§

RateLimited

Fields

§retry_after: Option<u64>
§

DeviceFlow(String)

The device flow ended without approval.

§

Protocol(String)

A response or stored artifact broke the contract (bad signature, wrong shape, unknown key).

§

Config(String)

Configuration that cannot work (URL scheme, root key).

§

Local(String)

Local storage failed.

§

Refused(String)

A local rule refused the request before it left (worker gate, outgoing screening); the message carries no content.

§

Task

Hive refused a task request (C0 1.9 §1); number names the task.

Fields

§refusal: TaskRefusal
§number: Option<u64>
§detail: Option<String>

The roles a not_permitted refusal names (Hive task #17).

§

Server

Any other service answer.

Fields

§status: u16
§code: String

Implementations§

Source§

impl HiveError

Source

pub fn with_plan(self, plan: HivePlan) -> Self

A plan_required of a feature names the workspace’s plan as the lease of the calling session says it; every other error is kept.

Source

pub fn is_transient(&self) -> bool

Whether retrying later can help.

Source

pub fn retry_after_at(&self, now: DateTime<Utc>) -> Option<u64>

Seconds to wait before this may be tried again, when Hive said so: retry_after_s/Retry-After of a 429, else the time until a waiting quota’s reset_at (seen from now).

Trait Implementations§

Source§

impl Clone for HiveError

Source§

fn clone(&self) -> Self

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 HiveError

Source§

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

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

impl Display for HiveError

Source§

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

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

impl Eq for HiveError

Source§

impl Error for HiveError

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ConsentError> for HiveError

Source§

fn from(error: ConsentError) -> Self

Converts to this type from the input type.
Source§

impl From<HiveError> for MapError

Source§

fn from(error: HiveError) -> Self

Converts to this type from the input type.
Source§

impl From<MapError> for HiveError

Source§

fn from(error: MapError) -> Self

Converts to this type from the input type.
Source§

impl From<Refusal> for HiveError

Source§

fn from(r: Refusal) -> Self

Converts to this type from the input type.
Source§

impl From<Refusal> for HiveError

A refusal reaches the caller with its own (content-free) words.

Source§

fn from(refusal: Refusal) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for HiveError

Source§

fn eq(&self, other: &Self) -> 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 HiveError

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
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

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

Source§

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

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

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

Source§

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

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

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

Source§

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

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

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

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

Source§

impl<T> Instrument for T

Source§

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

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

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

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
Source§

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

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

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