Struct alkahest::Bytes

source ·
pub struct Bytes;
Expand description

A formula for a raw byte slices.

Serializable from [u8], Vec<u8> VecDeque<u8>, str and String.

Trait Implementations§

source§

impl<'de> Deserialize<'de, Bytes> for Vec<u8>

source§

fn deserialize(de: Deserializer<'_>) -> Result<Self, DeserializeError>

Deserializes value provided deserializer. Returns deserialized value and the number of bytes consumed from the and of input. Read more
source§

fn deserialize_in_place( &mut self, de: Deserializer<'_> ) -> Result<(), DeserializeError>

Deserializes value in-place provided deserializer. Overwrites self with data from the input. Read more
source§

impl<'de> Deserialize<'de, Bytes> for VecDeque<u8>

source§

fn deserialize(de: Deserializer<'_>) -> Result<Self, DeserializeError>

Deserializes value provided deserializer. Returns deserialized value and the number of bytes consumed from the and of input. Read more
source§

fn deserialize_in_place( &mut self, de: Deserializer<'_> ) -> Result<(), DeserializeError>

Deserializes value in-place provided deserializer. Overwrites self with data from the input. Read more
source§

impl<'de, 'fe: 'de> Deserialize<'fe, Bytes> for &'de [u8]

source§

fn deserialize(de: Deserializer<'fe>) -> Result<Self, DeserializeError>

Deserializes value provided deserializer. Returns deserialized value and the number of bytes consumed from the and of input. Read more
source§

fn deserialize_in_place( &mut self, de: Deserializer<'fe> ) -> Result<(), DeserializeError>

Deserializes value in-place provided deserializer. Overwrites self with data from the input. Read more
source§

impl Formula for Bytes

source§

const MAX_STACK_SIZE: Option<usize> = None

Maximum size of stack this formula occupies.
source§

const EXACT_SIZE: bool = true

Signals that MAX_STACK_SIZE is accurate.
source§

const HEAPLESS: bool = true

Signals that heap is not used for serialzation.
source§

impl Serialize<Bytes> for &[u8]

source§

fn serialize<B>(self, sizes: &mut Sizes, buffer: B) -> Result<(), B::Error>where B: Buffer,

Serializes self into the given buffer. heap specifies the size of the buffer’s heap occupied prior to this call. Read more
source§

fn size_hint(&self) -> Option<Sizes>

Returns heap and stack sizes required to serialize self. If some sizes are returned they must be exact. Read more
source§

impl Serialize<Bytes> for &String

source§

fn serialize<B>(self, sizes: &mut Sizes, buffer: B) -> Result<(), B::Error>where B: Buffer,

Serializes self into the given buffer. heap specifies the size of the buffer’s heap occupied prior to this call. Read more
source§

fn size_hint(&self) -> Option<Sizes>

Returns heap and stack sizes required to serialize self. If some sizes are returned they must be exact. Read more
source§

impl Serialize<Bytes> for &Vec<u8>

source§

fn serialize<B>(self, sizes: &mut Sizes, buffer: B) -> Result<(), B::Error>where B: Buffer,

Serializes self into the given buffer. heap specifies the size of the buffer’s heap occupied prior to this call. Read more
source§

fn size_hint(&self) -> Option<Sizes>

Returns heap and stack sizes required to serialize self. If some sizes are returned they must be exact. Read more
source§

impl Serialize<Bytes> for &VecDeque<u8>

source§

fn serialize<B>(self, sizes: &mut Sizes, buffer: B) -> Result<(), B::Error>where B: Buffer,

Serializes self into the given buffer. heap specifies the size of the buffer’s heap occupied prior to this call. Read more
source§

fn size_hint(&self) -> Option<Sizes>

Returns heap and stack sizes required to serialize self. If some sizes are returned they must be exact. Read more
source§

impl Serialize<Bytes> for &str

source§

fn serialize<B>(self, sizes: &mut Sizes, buffer: B) -> Result<(), B::Error>where B: Buffer,

Serializes self into the given buffer. heap specifies the size of the buffer’s heap occupied prior to this call. Read more
source§

fn size_hint(&self) -> Option<Sizes>

Returns heap and stack sizes required to serialize self. If some sizes are returned they must be exact. Read more
source§

impl Serialize<Bytes> for String

source§

fn serialize<B>(self, sizes: &mut Sizes, buffer: B) -> Result<(), B::Error>where B: Buffer,

Serializes self into the given buffer. heap specifies the size of the buffer’s heap occupied prior to this call. Read more
source§

fn size_hint(&self) -> Option<Sizes>

Returns heap and stack sizes required to serialize self. If some sizes are returned they must be exact. Read more
source§

impl Serialize<Bytes> for Vec<u8>

source§

fn serialize<B>(self, sizes: &mut Sizes, buffer: B) -> Result<(), B::Error>where B: Buffer,

Serializes self into the given buffer. heap specifies the size of the buffer’s heap occupied prior to this call. Read more
source§

fn size_hint(&self) -> Option<Sizes>

Returns heap and stack sizes required to serialize self. If some sizes are returned they must be exact. Read more
source§

impl Serialize<Bytes> for VecDeque<u8>

source§

fn serialize<B>(self, sizes: &mut Sizes, buffer: B) -> Result<(), B::Error>where B: Buffer,

Serializes self into the given buffer. heap specifies the size of the buffer’s heap occupied prior to this call. Read more
source§

fn size_hint(&self) -> Option<Sizes>

Returns heap and stack sizes required to serialize self. If some sizes are returned they must be exact. Read more
source§

impl BareFormula for Bytes

Auto Trait Implementations§

§

impl RefUnwindSafe for Bytes

§

impl Send for Bytes

§

impl Sync for Bytes

§

impl Unpin for Bytes

§

impl UnwindSafe for Bytes

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.