[−][src]Struct splinter::network::dispatch::RawBytes
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]
fn from_message_bytes(message_bytes: &[u8]) -> Result<Self, DispatchError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for RawBytes
impl Send for RawBytes
impl Sync for RawBytes
impl Unpin for RawBytes
impl UnwindSafe for RawBytes
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
T: 'a + Clone + Send + Sync,
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> From<T> for T
[src]
impl<M> FromMessageBytes for M where
M: Message,
[src]
M: Message,
fn from_message_bytes(&[u8]) -> Result<M, DispatchError>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
&'a Self: AsExpression<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToHex for T where
T: AsRef<[u8]>,
T: AsRef<[u8]>,
fn write_hex<W>(&self, w: &mut W) -> Result<(), Error> where
W: Write,
W: Write,
fn write_hex_upper<W>(&self, w: &mut W) -> Result<(), Error> where
W: Write,
W: Write,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,