pub enum ConsumerClosedReason {
RequestedByClient,
ProtocolError,
InvalidPacket,
// some variants omitted
}
Expand description
Used to indicate why a consumer has closed a stream sink connection. TODO(dalesat): Expand this enum as needed.
Variants§
RequestedByClient
The consumer’s client requested that the connection be closed.
ProtocolError
The client violated the StreamSink protocol. For example, the client’s StartSegmeent call did not use a strictly-increasing ID.
InvalidPacket
The client sent an invalid Packet.
Implementations§
Source§impl ConsumerClosedReason
impl ConsumerClosedReason
pub fn from_primitive(prim: u32) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: u32) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for ConsumerClosedReason
impl Clone for ConsumerClosedReason
Source§fn clone(&self) -> ConsumerClosedReason
fn clone(&self) -> ConsumerClosedReason
Returns a copy 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 ConsumerClosedReason
impl Debug for ConsumerClosedReason
Source§impl<D: ResourceDialect> Decode<ConsumerClosedReason, D> for ConsumerClosedReason
impl<D: ResourceDialect> Decode<ConsumerClosedReason, D> for ConsumerClosedReason
Source§impl<D: ResourceDialect> Encode<ConsumerClosedReason, D> for ConsumerClosedReason
impl<D: ResourceDialect> Encode<ConsumerClosedReason, D> for ConsumerClosedReason
Source§impl Hash for ConsumerClosedReason
impl Hash for ConsumerClosedReason
Source§impl Ord for ConsumerClosedReason
impl Ord for ConsumerClosedReason
Source§fn cmp(&self, other: &ConsumerClosedReason) -> Ordering
fn cmp(&self, other: &ConsumerClosedReason) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ConsumerClosedReason
impl PartialEq for ConsumerClosedReason
Source§impl PartialOrd for ConsumerClosedReason
impl PartialOrd for ConsumerClosedReason
Source§impl TypeMarker for ConsumerClosedReason
impl TypeMarker for ConsumerClosedReason
Source§type Owned = ConsumerClosedReason
type Owned = ConsumerClosedReason
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for ConsumerClosedReason
impl ValueTypeMarker for ConsumerClosedReason
Source§type Borrowed<'a> = ConsumerClosedReason
type Borrowed<'a> = ConsumerClosedReason
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for ConsumerClosedReason
impl Eq for ConsumerClosedReason
impl StructuralPartialEq for ConsumerClosedReason
Auto Trait Implementations§
impl Freeze for ConsumerClosedReason
impl RefUnwindSafe for ConsumerClosedReason
impl Send for ConsumerClosedReason
impl Sync for ConsumerClosedReason
impl Unpin for ConsumerClosedReason
impl UnwindSafe for ConsumerClosedReason
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)