MessageRequest

Struct MessageRequest 

Source
pub struct MessageRequest<P, D> {
    pub service_code: u8,
    pub path: P,
    pub data: D,
}
Expand description

Message request

Fields§

§service_code: u8

service request code

§path: P

service request path

§data: D

service request data

Implementations§

Source§

impl<P, D> MessageRequest<P, D>
where P: Encode, D: Encode,

Source

pub fn new(service_code: u8, path: P, data: D) -> Self

Trait Implementations§

Source§

impl<P: Debug, D: Debug> Debug for MessageRequest<P, D>

Source§

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

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

impl<P: Default, D: Default> Default for MessageRequest<P, D>

Source§

fn default() -> MessageRequest<P, D>

Returns the “default value” for a type. Read more
Source§

impl<P: Encode, D: Encode> Encode for MessageRequest<P, D>

Source§

fn encode<A: Encoder>( self, buf: &mut BytesMut, encoder: &mut A, ) -> Result<(), A::Error>
where Self: Sized,

encode by moved values
Source§

fn encode_by_ref<A: Encoder>( &self, buf: &mut BytesMut, encoder: &mut A, ) -> Result<(), A::Error>

encode by references
Source§

fn bytes_count(&self) -> usize

be careful to calculate the number of bytes
Source§

impl<P: PartialEq, D: PartialEq> PartialEq for MessageRequest<P, D>

Source§

fn eq(&self, other: &MessageRequest<P, D>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<P: Eq, D: Eq> Eq for MessageRequest<P, D>

Source§

impl<P, D> StructuralPartialEq for MessageRequest<P, D>

Auto Trait Implementations§

§

impl<P, D> Freeze for MessageRequest<P, D>
where P: Freeze, D: Freeze,

§

impl<P, D> RefUnwindSafe for MessageRequest<P, D>

§

impl<P, D> Send for MessageRequest<P, D>
where P: Send, D: Send,

§

impl<P, D> Sync for MessageRequest<P, D>
where P: Sync, D: Sync,

§

impl<P, D> Unpin for MessageRequest<P, D>
where P: Unpin, D: Unpin,

§

impl<P, D> UnwindSafe for MessageRequest<P, D>
where P: UnwindSafe, D: 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, 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