[][src]Struct splinter::network::dispatch::RawBytes

pub struct RawBytes { /* fields omitted */ }

A container for the raw bytes of a message.

This is useful for handlers that don't deserialize the bytes via this process. For example, a handler that forwards the messages may utilize this as a message type.

Methods

impl RawBytes[src]

pub fn into_inner(self) -> Vec<u8>[src]

Unwraps the value.

pub fn bytes(&self) -> &[u8][src]

Returns a reference to the bytes

Note, this same value may be returned by using as_ref():

let raw_bytes = RawBytes::from("Value".as_bytes());
assert_eq!(raw_bytes.bytes(), raw_bytes.as_ref());

Trait Implementations

impl AsRef<[u8]> for RawBytes[src]

impl Clone for RawBytes[src]

impl Debug for RawBytes[src]

impl<'_> From<&'_ [u8]> for RawBytes[src]

impl FromMessageBytes for RawBytes[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync

impl<T> From<T> for T[src]

impl<M> FromMessageBytes for M where
    M: Message
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoSql for T

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToHex for T where
    T: AsRef<[u8]>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,