pub(crate) enum Status {
Success,
ExitCode(i32),
Error(String),
}Expand description
The final status of a session.
Variants§
Success
ExitCode(i32)
Error(String)
The session itself failed, for example a command which could not be
started. The message is the one of the internal error, see
Status::failed.
Implementations§
Source§impl Status
impl Status
Sourcepub(crate) fn exited(code: i32) -> Self
pub(crate) fn exited(code: i32) -> Self
The status of a command which exited with code. A negative one
tells that it could not be waited for, clients only take exit codes
from 1 to 255.
Sourcepub(crate) fn failed(operation: Operation, error: impl Display) -> Self
pub(crate) fn failed(operation: Operation, error: impl Display) -> Self
The failure of a session, worded like k8s.io/cri-streaming does.
Sourcepub(super) fn encode(&self, version: Version) -> Result<Option<Vec<u8>>>
pub(super) fn encode(&self, version: Version) -> Result<Option<Vec<u8>>>
The status on the error stream, none for a success before v4.
fn json(status: &impl Serialize) -> Result<Vec<u8>>
Trait Implementations§
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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].