Reply

Struct Reply 

Source
pub struct Reply<E> {
    pub request_id: u32,
    pub element: E,
}
Expand description

A wrapper for a reply element, with the request ID and the underlying element.

Fields§

§request_id: u32

The request ID this reply is for.

§element: E

The inner reply element.

Implementations§

Source§

impl<E> Reply<E>

Source

pub fn new(request_id: u32, element: E) -> Self

Trait Implementations§

Source§

impl<E: Debug> Debug for Reply<E>

Source§

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

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

impl<E: Element> Element for Reply<E>

Source§

type Config = <E as Element>::Config

Type of the element’s config that is being encoded and decoded.
Source§

fn encode(&self, write: &mut impl Write, config: &Self::Config) -> Result<()>

Encode the element with the given writer and the given configuration.
Source§

fn decode( read: &mut impl Read, len: usize, config: &Self::Config, ) -> Result<Self>

Decode the element from the given reader and the given configuration. Read more
Source§

impl<E: Element> TopElement for Reply<E>

Source§

const LEN: ElementLength = ElementLength::Variable32

The type of length that prefixes the element’s content and describe how much space is taken by the element.

Auto Trait Implementations§

§

impl<E> Freeze for Reply<E>
where E: Freeze,

§

impl<E> RefUnwindSafe for Reply<E>
where E: RefUnwindSafe,

§

impl<E> Send for Reply<E>
where E: Send,

§

impl<E> Sync for Reply<E>
where E: Sync,

§

impl<E> Unpin for Reply<E>
where E: Unpin,

§

impl<E> UnwindSafe for Reply<E>
where E: UnwindSafe,

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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