Skip to main content

Raw

Struct Raw 

Source
pub struct Raw;
Expand description

Bytes as they are (Vec<u8>): a payload a format doesn’t look into.

Trait Implementations§

Source§

impl With<Vec<u8>> for Raw

Source§

fn shape() -> Shape

Source§

fn read(v: &ValueRef<'_>, cx: &mut Reader<'_>) -> Option<Vec<u8>>

Source§

fn write(f: &Vec<u8>) -> Value

Source§

fn encode(f: &Vec<u8>, w: &mut Writer)

The field in the binary form, straight: its value encoded unless the codec knows better.
Source§

fn decode(d: &mut Decoder<'_>) -> Option<Vec<u8>>

The field from the binary form, straight; None sends the read the slow way (see Schema::decode).
Source§

fn pack(f: &Vec<u8>, p: &mut Packer)

The field packed into a frame: its binary form as bytes unless the codec knows better.
Source§

fn unpack(u: &mut Unpacker<'_>) -> Option<Vec<u8>>

The field out of a frame.
Source§

fn absent() -> Option<Vec<u8>>

The field’s value when it isn’t there (None: it’s required).
Source§

fn skip(_f: &F) -> bool

Whether a struct leaves the field out.

Auto Trait Implementations§

§

impl Freeze for Raw

§

impl RefUnwindSafe for Raw

§

impl Send for Raw

§

impl Sync for Raw

§

impl Unpin for Raw

§

impl UnsafeUnpin for Raw

§

impl UnwindSafe for Raw

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.