Struct massa_time::MassaTimeSerializer
source · pub struct MassaTimeSerializer {
pub(crate) u64_serializer: U64VarIntSerializer,
}
Expand description
Serializer for MassaTime
Fields§
§u64_serializer: U64VarIntSerializer
Implementations§
Trait Implementations§
source§impl Default for MassaTimeSerializer
impl Default for MassaTimeSerializer
source§impl Serializer<MassaTime> for MassaTimeSerializer
impl Serializer<MassaTime> for MassaTimeSerializer
source§fn serialize(
&self,
value: &MassaTime,
buffer: &mut Vec<u8>,
) -> Result<(), SerializeError>
fn serialize( &self, value: &MassaTime, buffer: &mut Vec<u8>, ) -> Result<(), SerializeError>
use std::ops::Bound::Included;
use massa_serialization::Serializer;
use massa_time::{MassaTime, MassaTimeSerializer};
let time: MassaTime = MassaTime::from_millis(30);
let mut serialized = Vec::new();
let serializer = MassaTimeSerializer::new();
serializer.serialize(&time, &mut serialized).unwrap();
Auto Trait Implementations§
impl Freeze for MassaTimeSerializer
impl RefUnwindSafe for MassaTimeSerializer
impl Send for MassaTimeSerializer
impl Sync for MassaTimeSerializer
impl Unpin for MassaTimeSerializer
impl UnwindSafe for MassaTimeSerializer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request