pub trait Serializer: Sized {
type Error: Error;
type Compound: Compound<Error = Self::Error>;
Show 25 methods
// Required methods
fn serialize_bool(self, v: bool) -> Result<(), Self::Error>;
fn serialize_int(self, v: &Int) -> Result<(), Self::Error>;
fn serialize_i128(self, v: i128) -> Result<(), Self::Error>;
fn serialize_nat(self, v: &Nat) -> Result<(), Self::Error>;
fn serialize_u128(self, v: u128) -> Result<(), Self::Error>;
fn serialize_nat8(self, v: u8) -> Result<(), Self::Error>;
fn serialize_nat16(self, v: u16) -> Result<(), Self::Error>;
fn serialize_nat32(self, v: u32) -> Result<(), Self::Error>;
fn serialize_nat64(self, v: u64) -> Result<(), Self::Error>;
fn serialize_int8(self, v: i8) -> Result<(), Self::Error>;
fn serialize_int16(self, v: i16) -> Result<(), Self::Error>;
fn serialize_int32(self, v: i32) -> Result<(), Self::Error>;
fn serialize_int64(self, v: i64) -> Result<(), Self::Error>;
fn serialize_float32(self, v: f32) -> Result<(), Self::Error>;
fn serialize_float64(self, v: f64) -> Result<(), Self::Error>;
fn serialize_text(self, v: &str) -> Result<(), Self::Error>;
fn serialize_null(self, v: ()) -> Result<(), Self::Error>;
fn serialize_empty(self) -> Result<(), Self::Error>;
fn serialize_option<T>(self, v: Option<&T>) -> Result<(), Self::Error>
where T: CandidType + ?Sized;
fn serialize_struct(self) -> Result<Self::Compound, Self::Error>;
fn serialize_vec(self, len: usize) -> Result<Self::Compound, Self::Error>;
fn serialize_blob(self, v: &[u8]) -> Result<(), Self::Error>;
fn serialize_variant(
self,
index: u64,
) -> Result<Self::Compound, Self::Error>;
fn serialize_principal(self, v: &[u8]) -> Result<(), Self::Error>;
fn serialize_function(self, v: &[u8], meth: &str) -> Result<(), Self::Error>;
}
Required Associated Types§
Required Methods§
fn serialize_bool(self, v: bool) -> Result<(), Self::Error>
fn serialize_int(self, v: &Int) -> Result<(), Self::Error>
fn serialize_i128(self, v: i128) -> Result<(), Self::Error>
fn serialize_nat(self, v: &Nat) -> Result<(), Self::Error>
fn serialize_u128(self, v: u128) -> Result<(), Self::Error>
fn serialize_nat8(self, v: u8) -> Result<(), Self::Error>
fn serialize_nat16(self, v: u16) -> Result<(), Self::Error>
fn serialize_nat32(self, v: u32) -> Result<(), Self::Error>
fn serialize_nat64(self, v: u64) -> Result<(), Self::Error>
fn serialize_int8(self, v: i8) -> Result<(), Self::Error>
fn serialize_int16(self, v: i16) -> Result<(), Self::Error>
fn serialize_int32(self, v: i32) -> Result<(), Self::Error>
fn serialize_int64(self, v: i64) -> Result<(), Self::Error>
fn serialize_float32(self, v: f32) -> Result<(), Self::Error>
fn serialize_float64(self, v: f64) -> Result<(), Self::Error>
fn serialize_text(self, v: &str) -> Result<(), Self::Error>
fn serialize_null(self, v: ()) -> Result<(), Self::Error>
fn serialize_empty(self) -> Result<(), Self::Error>
fn serialize_option<T>(self, v: Option<&T>) -> Result<(), Self::Error>where
T: CandidType + ?Sized,
fn serialize_struct(self) -> Result<Self::Compound, Self::Error>
fn serialize_vec(self, len: usize) -> Result<Self::Compound, Self::Error>
fn serialize_blob(self, v: &[u8]) -> Result<(), Self::Error>
fn serialize_variant(self, index: u64) -> Result<Self::Compound, Self::Error>
fn serialize_principal(self, v: &[u8]) -> Result<(), Self::Error>
fn serialize_function(self, v: &[u8], meth: &str) -> Result<(), Self::Error>
Object Safety§
This trait is not object safe.