Trait cbor4ii::core::enc::Encode

source ·
pub trait Encode {
    // Required method
    fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>;
}
Expand description

Encode trait

Required Methods§

source

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

Write the type to writer by CBOR encoding.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Encode for &str

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for bool

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for f32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for f64

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for i8

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for i16

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for i32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for i64

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for i128

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for u8

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for u16

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for u32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for u64

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for u128

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl Encode for f16

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl<T: Encode> Encode for &[T]

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

source§

impl<T: Encode> Encode for &T

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Error<W::Error>>

Implementors§