Trait temporenc::Serializable
[−]
[src]
pub trait Serializable { fn max_serialized_size() -> usize; fn serialized_size(&self) -> usize; fn serialize<W: Write>(
&self,
writer: &mut W
) -> Result<usize, SerializationError>; }
Serialize into the Temporenc binary format.
Required Methods
fn max_serialized_size() -> usize
The largest encoded size of any instance of the type. Some types have variable precision, and instances with higher precision will use more bytes than those with lower precision.
fn serialized_size(&self) -> usize
The encoded size of this instance. No larger than max_serialized_size()
.
fn serialize<W: Write>(
&self,
writer: &mut W
) -> Result<usize, SerializationError>
&self,
writer: &mut W
) -> Result<usize, SerializationError>
Serialize into the provided writer with the Temporenc format. Returns the number of bytes
written, which will be the same as serialized_size()
.
Implementors
impl Serializable for DateOnly
impl Serializable for TimeOnly
impl Serializable for DateTime
impl Serializable for DateTimeOffset
impl Serializable for DateTimeSubSecond
impl Serializable for DateTimeSubSecondOffset