Trait diny::backend::FormatSerialize [−][src]
pub trait FormatSerialize: FormatEncode {
Show 40 associated items
type SerializeUnit: Future + Unpin;
type SerializeBool: Future + Unpin;
type SerializeI8: Future + Unpin;
type SerializeI16: Future + Unpin;
type SerializeI32: Future + Unpin;
type SerializeI64: Future + Unpin;
type SerializeI128: Future + Unpin;
type SerializeU8: Future + Unpin;
type SerializeU16: Future + Unpin;
type SerializeU32: Future + Unpin;
type SerializeU64: Future + Unpin;
type SerializeU128: Future + Unpin;
type SerializeF32: Future + Unpin;
type SerializeF64: Future + Unpin;
type SerializeByteSlice: Future + Unpin;
type SerializeChar: Future + Unpin;
type SerializeStr: Future + Unpin;
type SerializeString: Future + Unpin;
type SerializeVariantIdx: Future + Unpin;
type SerializeSequenceLen: Future + Unpin;
fn serialize_unit<W>(
&'w self,
writer: &'w mut W,
data: &()
) -> Self::SerializeUnit
where
W: AsyncWrite + Unpin;
fn serialize_bool<W>(
&'w self,
writer: &'w mut W,
data: &bool
) -> Self::SerializeBool
where
W: AsyncWrite + Unpin;
fn serialize_i8<W>(
&'w self,
writer: &'w mut W,
data: &i8
) -> Self::SerializeI8
where
W: AsyncWrite + Unpin;
fn serialize_i16<W>(
&'w self,
writer: &'w mut W,
data: &i16
) -> Self::SerializeI16
where
W: AsyncWrite + Unpin;
fn serialize_i32<W>(
&'w self,
writer: &'w mut W,
data: &i32
) -> Self::SerializeI32
where
W: AsyncWrite + Unpin;
fn serialize_i64<W>(
&'w self,
writer: &'w mut W,
data: &i64
) -> Self::SerializeI64
where
W: AsyncWrite + Unpin;
fn serialize_i128<W>(
&'w self,
writer: &'w mut W,
data: &i128
) -> Self::SerializeI128
where
W: AsyncWrite + Unpin;
fn serialize_u8<W>(
&'w self,
writer: &'w mut W,
data: &u8
) -> Self::SerializeU8
where
W: AsyncWrite + Unpin;
fn serialize_u16<W>(
&'w self,
writer: &'w mut W,
data: &u16
) -> Self::SerializeU16
where
W: AsyncWrite + Unpin;
fn serialize_u32<W>(
&'w self,
writer: &'w mut W,
data: &u32
) -> Self::SerializeU32
where
W: AsyncWrite + Unpin;
fn serialize_u64<W>(
&'w self,
writer: &'w mut W,
data: &u64
) -> Self::SerializeU64
where
W: AsyncWrite + Unpin;
fn serialize_u128<W>(
&'w self,
writer: &'w mut W,
data: &u128
) -> Self::SerializeU128
where
W: AsyncWrite + Unpin;
fn serialize_f32<W>(
&'w self,
writer: &'w mut W,
data: &f32
) -> Self::SerializeF32
where
W: AsyncWrite + Unpin;
fn serialize_f64<W>(
&'w self,
writer: &'w mut W,
data: &f64
) -> Self::SerializeF64
where
W: AsyncWrite + Unpin;
fn serialize_byte_slice<W>(
&'w self,
writer: &'w mut W,
data: &'w [u8]
) -> Self::SerializeByteSlice
where
W: AsyncWrite + Unpin;
fn serialize_char<W>(
&'w self,
writer: &'w mut W,
data: &char
) -> Self::SerializeChar
where
W: AsyncWrite + Unpin;
fn serialize_str<W>(
&'w self,
writer: &'w mut W,
data: &'w str
) -> Self::SerializeStr
where
W: AsyncWrite + Unpin;
fn serialize_string<W>(
&'w self,
writer: &'w mut W,
data: &'w String
) -> Self::SerializeString
where
W: AsyncWrite + Unpin;
fn serialize_variant_idx<W>(
&'w self,
writer: &'w mut W,
data: &VariantIdx
) -> Self::SerializeVariantIdx
where
W: AsyncWrite + Unpin;
fn serialize_sequence_len<W>(
&'w self,
writer: &'w mut W,
data: &SequenceLen
) -> Self::SerializeSequenceLen
where
W: AsyncWrite + Unpin;
}
Expand description
Define the primitive serialization methods and the concrete futures they return.
Associated Types
type SerializeUnit: Future + Unpin
type SerializeBool: Future + Unpin
type SerializeI8: Future + Unpin
type SerializeI16: Future + Unpin
type SerializeI32: Future + Unpin
type SerializeI64: Future + Unpin
type SerializeI128: Future + Unpin
type SerializeU8: Future + Unpin
type SerializeU16: Future + Unpin
type SerializeU32: Future + Unpin
type SerializeU64: Future + Unpin
type SerializeU128: Future + Unpin
type SerializeF32: Future + Unpin
type SerializeF64: Future + Unpin
type SerializeByteSlice: Future + Unpin
type SerializeChar: Future + Unpin
type SerializeStr: Future + Unpin
type SerializeString: Future + Unpin
type SerializeString: Future + Unpin
This is supported on crate features
std
or alloc
only.type SerializeVariantIdx: Future + Unpin
type SerializeSequenceLen: Future + Unpin
Required methods
fn serialize_unit<W>(
&'w self,
writer: &'w mut W,
data: &()
) -> Self::SerializeUnit where
W: AsyncWrite + Unpin,
fn serialize_bool<W>(
&'w self,
writer: &'w mut W,
data: &bool
) -> Self::SerializeBool where
W: AsyncWrite + Unpin,
fn serialize_i8<W>(&'w self, writer: &'w mut W, data: &i8) -> Self::SerializeI8 where
W: AsyncWrite + Unpin,
fn serialize_i16<W>(
&'w self,
writer: &'w mut W,
data: &i16
) -> Self::SerializeI16 where
W: AsyncWrite + Unpin,
fn serialize_i32<W>(
&'w self,
writer: &'w mut W,
data: &i32
) -> Self::SerializeI32 where
W: AsyncWrite + Unpin,
fn serialize_i64<W>(
&'w self,
writer: &'w mut W,
data: &i64
) -> Self::SerializeI64 where
W: AsyncWrite + Unpin,
fn serialize_i128<W>(
&'w self,
writer: &'w mut W,
data: &i128
) -> Self::SerializeI128 where
W: AsyncWrite + Unpin,
fn serialize_u8<W>(&'w self, writer: &'w mut W, data: &u8) -> Self::SerializeU8 where
W: AsyncWrite + Unpin,
fn serialize_u16<W>(
&'w self,
writer: &'w mut W,
data: &u16
) -> Self::SerializeU16 where
W: AsyncWrite + Unpin,
fn serialize_u32<W>(
&'w self,
writer: &'w mut W,
data: &u32
) -> Self::SerializeU32 where
W: AsyncWrite + Unpin,
fn serialize_u64<W>(
&'w self,
writer: &'w mut W,
data: &u64
) -> Self::SerializeU64 where
W: AsyncWrite + Unpin,
fn serialize_u128<W>(
&'w self,
writer: &'w mut W,
data: &u128
) -> Self::SerializeU128 where
W: AsyncWrite + Unpin,
fn serialize_f32<W>(
&'w self,
writer: &'w mut W,
data: &f32
) -> Self::SerializeF32 where
W: AsyncWrite + Unpin,
fn serialize_f64<W>(
&'w self,
writer: &'w mut W,
data: &f64
) -> Self::SerializeF64 where
W: AsyncWrite + Unpin,
fn serialize_byte_slice<W>(
&'w self,
writer: &'w mut W,
data: &'w [u8]
) -> Self::SerializeByteSlice where
W: AsyncWrite + Unpin,
fn serialize_char<W>(
&'w self,
writer: &'w mut W,
data: &char
) -> Self::SerializeChar where
W: AsyncWrite + Unpin,
fn serialize_str<W>(
&'w self,
writer: &'w mut W,
data: &'w str
) -> Self::SerializeStr where
W: AsyncWrite + Unpin,
fn serialize_string<W>(
&'w self,
writer: &'w mut W,
data: &'w String
) -> Self::SerializeString where
W: AsyncWrite + Unpin,
fn serialize_string<W>(
&'w self,
writer: &'w mut W,
data: &'w String
) -> Self::SerializeString where
W: AsyncWrite + Unpin,
This is supported on crate features
std
or alloc
only.