pub enum LevinMessage<T: LevinBody> {
Body(T),
Bucket(Bucket<T::Command>),
Dummy(usize),
}Expand description
A levin message that can be sent to a peer.
Variants§
Body(T)
A message body.
A levin header will be added to this message before it is sent to the peer.
Bucket(Bucket<T::Command>)
A full levin bucket.
This bucket will be sent to the peer directly with no extra information.
This should only be used to send fragmented messages: make_fragmented_messages
Dummy(usize)
A dummy message.
A dummy message which the peer will ignore. The dummy message will be the exact size
(in bytes) of the given usize on the wire.
Trait Implementations§
Source§impl<T: LevinBody> Encoder<LevinMessage<T>> for LevinMessageCodec<T>
impl<T: LevinBody> Encoder<LevinMessage<T>> for LevinMessageCodec<T>
Auto Trait Implementations§
impl<T> !Freeze for LevinMessage<T>
impl<T> RefUnwindSafe for LevinMessage<T>
impl<T> Send for LevinMessage<T>
impl<T> Sync for LevinMessage<T>
impl<T> Unpin for LevinMessage<T>
impl<T> UnsafeUnpin for LevinMessage<T>
impl<T> UnwindSafe for LevinMessage<T>
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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 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> ⓘ
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> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.