Trait StrictEncode

Source
pub trait StrictEncode: StrictType {
    // Required method
    fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>;

    // Provided method
    fn strict_write(&self, writer: impl WriteRaw) -> Result<()> { ... }
}

Required Methods§

Source

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Provided Methods§

Source

fn strict_write(&self, writer: impl WriteRaw) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl StrictEncode for bool

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for i8

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for i16

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for i32

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for i64

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for i128

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u8

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u16

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u32

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u64

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u128

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for ()

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for i256

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for i512

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for i1024

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u256

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u512

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u1024

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u1

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u2

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u3

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u4

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u5

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u6

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u7

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u24

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u40

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u48

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for u56

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for NonZeroU8

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for NonZeroU16

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for NonZeroU32

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for NonZeroU64

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for NonZeroU128

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for Double

Available on crate feature float only.
Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for Half

Available on crate feature float only.
Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for Oct

Available on crate feature float only.
Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for Quad

Available on crate feature float only.
Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for Single

Available on crate feature float only.
Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl StrictEncode for X87DoubleExtended

Available on crate feature float only.
Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<A: StrictEncode + Default, B: StrictEncode + Default> StrictEncode for (A, B)

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<A: StrictEncode + Default, B: StrictEncode + Default, C: StrictEncode + Default> StrictEncode for (A, B, C)

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<K: StrictEncode + Ord + Hash + StrictDumb, V: StrictEncode + StrictDumb, const MIN_LEN: usize, const MAX_LEN: usize> StrictEncode for Confined<BTreeMap<K, V>, MIN_LEN, MAX_LEN>

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<T> StrictEncode for Box<T>
where T: StrictEncode,

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<T> StrictEncode for PhantomData<T>

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<T: StrictEncode + Ord + StrictDumb, const MIN_LEN: usize, const MAX_LEN: usize> StrictEncode for Confined<BTreeSet<T>, MIN_LEN, MAX_LEN>

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<T: StrictEncode + Copy + StrictDumb, const LEN: usize> StrictEncode for [T; LEN]

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<T: StrictEncode + StrictDumb + Copy, const LEN: usize, const REVERSE_STR: bool> StrictEncode for Array<T, LEN, REVERSE_STR>

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<T: StrictEncode + StrictDumb> StrictEncode for Option<T>

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<T: StrictEncode + StrictDumb, const MIN_LEN: usize, const MAX_LEN: usize> StrictEncode for Confined<VecDeque<T>, MIN_LEN, MAX_LEN>

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<T: StrictEncode + StrictDumb, const MIN_LEN: usize, const MAX_LEN: usize> StrictEncode for Confined<Vec<T>, MIN_LEN, MAX_LEN>

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<T: StrictEncode> StrictEncode for &T

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<const MIN_LEN: usize, const MAX_LEN: usize> StrictEncode for Confined<String, MIN_LEN, MAX_LEN>

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

impl<const MIN_LEN: usize, const MAX_LEN: usize> StrictEncode for Confined<AsciiString, MIN_LEN, MAX_LEN>

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Implementors§

Source§

impl StrictEncode for Alpha

Source§

impl StrictEncode for AlphaCaps

Source§

impl StrictEncode for AlphaCapsDash

Source§

impl StrictEncode for AlphaCapsDot

Source§

impl StrictEncode for AlphaCapsLodash

Source§

impl StrictEncode for AlphaCapsNum

Source§

impl StrictEncode for AlphaDash

Source§

impl StrictEncode for AlphaDot

Source§

impl StrictEncode for AlphaLodash

Source§

impl StrictEncode for AlphaNum

Source§

impl StrictEncode for AlphaNumDash

Source§

impl StrictEncode for AlphaNumDot

Source§

impl StrictEncode for AlphaNumLodash

Source§

impl StrictEncode for AlphaSmall

Source§

impl StrictEncode for AlphaSmallDash

Source§

impl StrictEncode for AlphaSmallDot

Source§

impl StrictEncode for AlphaSmallLodash

Source§

impl StrictEncode for Bool

Source§

impl StrictEncode for Dec

Source§

impl StrictEncode for DecDot

Source§

impl StrictEncode for HexDecCaps

Source§

impl StrictEncode for HexDecSmall

Source§

impl StrictEncode for U1

Source§

impl StrictEncode for U2

Source§

impl StrictEncode for U3

Source§

impl StrictEncode for U4

Source§

impl StrictEncode for U5

Source§

impl StrictEncode for U6

Source§

impl StrictEncode for U7

Source§

impl StrictEncode for AsciiPrintable

Source§

impl StrictEncode for AsciiSym

Source§

impl StrictEncode for Byte

Source§

impl StrictEncode for FieldName

Source§

impl StrictEncode for Ident

Source§

impl StrictEncode for LibName

Source§

impl StrictEncode for Primitive

Source§

impl StrictEncode for Sizing

Source§

impl StrictEncode for TypeName

Source§

impl StrictEncode for Variant

Source§

impl StrictEncode for VariantName

Source§

impl<C1: RestrictedCharSet, C: RestrictedCharSet, const MIN_LEN: usize, const MAX_LEN: usize> StrictEncode for RString<C1, C, MIN_LEN, MAX_LEN>