Struct ModelWait
#[non_exhaustive]pub struct ModelWait {
pub reason: String,
pub status: Option<u16>,
pub slug: Option<String>,
pub park: ModelPark,
pub parked_since: Timestamp,
pub parks: u32,
pub wake_at: Option<Timestamp>,
}Expand description
The model call a run waits to make again (Conversation::model_wait).
It holds the reason, the status and the slug of the refusal, never a header, a body or a credential: that is all a client is told, and all the journal holds.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.reason: StringWhat a person reads: “not authorized by the model gateway”, “the model gateway is busy”.
status: Option<u16>The refusal’s HTTP status; None for an endpoint that could not be reached.
slug: Option<String>The refusal’s problem type (Refusal::slug), when it had one.
park: ModelParkHow the run wakes.
parked_since: TimestampThe journaled time of the first park of this kind in a row: the start of what
ModelParking::limit bounds. A call that succeeds clears the whole wait.
parks: u32How many parks on a timer in a row this is (the backoff’s step); 0 for a park until woken.
wake_at: Option<Timestamp>When a park on a timer wakes; None for a park until woken.
Trait Implementations§
§impl<'de> Deserialize<'de> for ModelWait
impl<'de> Deserialize<'de> for ModelWait
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelWait, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelWait, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ModelWait
§impl Serialize for ModelWait
impl Serialize for ModelWait
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ModelWait
Auto Trait Implementations§
impl Freeze for ModelWait
impl RefUnwindSafe for ModelWait
impl Send for ModelWait
impl Sync for ModelWait
impl Unpin for ModelWait
impl UnsafeUnpin for ModelWait
impl UnwindSafe for ModelWait
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
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>,
Layered].