pub struct Duration(/* private fields */);Expand description
Duration is a number of nanoseconds. The default value of Duration is 0 nanoseconds.
Implementations§
Trait Implementations§
Source§impl AddAssign<Duration> for Time
impl AddAssign<Duration> for Time
Source§fn add_assign(&mut self, rhs: Duration)
fn add_assign(&mut self, rhs: Duration)
Performs the
+= operation. Read moreSource§impl KeyFieldValue for Duration
impl KeyFieldValue for Duration
Source§fn encode<'a>(
key: &<Duration as ObjectFieldValue>::In<'a>,
writer: &mut ReverseSliceWriter<'_>,
) -> Result<(), EncodeError>
fn encode<'a>( key: &<Duration as ObjectFieldValue>::In<'a>, writer: &mut ReverseSliceWriter<'_>, ) -> Result<(), EncodeError>
Encode the key segment as a non-terminal segment.
Source§fn decode<'a>(
reader: &mut &'a [u8],
memory_manager: &'a MemoryManager,
) -> Result<<Duration as ObjectFieldValue>::Out<'a>, DecodeError>
fn decode<'a>( reader: &mut &'a [u8], memory_manager: &'a MemoryManager, ) -> Result<<Duration as ObjectFieldValue>::Out<'a>, DecodeError>
Decode the key segment as a non-terminal segment.
Source§fn out_size<'a>(key: &<Duration as ObjectFieldValue>::In<'a>) -> usize
fn out_size<'a>(key: &<Duration as ObjectFieldValue>::In<'a>) -> usize
Get the size of the key segment as a non-terminal segment.
Source§fn encode_terminal<'a>(
key: &Self::In<'a>,
writer: &mut ReverseSliceWriter<'_>,
) -> Result<(), EncodeError>
fn encode_terminal<'a>( key: &Self::In<'a>, writer: &mut ReverseSliceWriter<'_>, ) -> Result<(), EncodeError>
Encode the key segment as the terminal segment.
Source§fn decode_terminal<'a>(
reader: &mut &'a [u8],
memory_manager: &'a MemoryManager,
) -> Result<Self::Out<'a>, DecodeError>
fn decode_terminal<'a>( reader: &mut &'a [u8], memory_manager: &'a MemoryManager, ) -> Result<Self::Out<'a>, DecodeError>
Decode the key segment as the terminal segment.
Source§fn out_size_terminal<'a>(key: &Self::In<'a>) -> usize
fn out_size_terminal<'a>(key: &Self::In<'a>) -> usize
Get the size of the key segment as the terminal segment.
Source§impl MulAssign<i128> for Duration
impl MulAssign<i128> for Duration
Source§fn mul_assign(&mut self, rhs: i128)
fn mul_assign(&mut self, rhs: i128)
Performs the
*= operation. Read moreSource§impl ObjectFieldValue for Duration
impl ObjectFieldValue for Duration
Source§impl Ord for Duration
impl Ord for Duration
Source§impl PartialOrd for Duration
impl PartialOrd for Duration
Source§impl<'a> SchemaValue<'a> for Duration
impl<'a> SchemaValue<'a> for Duration
Source§type DecodeState = Duration
type DecodeState = Duration
In progress decoding state.
Source§fn visit_decode_state(
state: &mut <Duration as SchemaValue<'a>>::DecodeState,
decoder: &mut dyn Decoder<'a>,
) -> Result<(), DecodeError>
fn visit_decode_state( state: &mut <Duration as SchemaValue<'a>>::DecodeState, decoder: &mut dyn Decoder<'a>, ) -> Result<(), DecodeError>
Decode the value from the decoder.
Source§fn finish_decode_state(
state: <Duration as SchemaValue<'a>>::DecodeState,
_: &'a MemoryManager,
) -> Result<Duration, DecodeError>
fn finish_decode_state( state: <Duration as SchemaValue<'a>>::DecodeState, _: &'a MemoryManager, ) -> Result<Duration, DecodeError>
Finish decoding the value, return it and return the memory handle if needed.
Source§impl SubAssign<Duration> for Time
impl SubAssign<Duration> for Time
Source§fn sub_assign(&mut self, rhs: Duration)
fn sub_assign(&mut self, rhs: Duration)
Performs the
-= operation. Read moreimpl Copy for Duration
impl Eq for Duration
impl<'a> ListElementValue<'a> for Duration
impl StructuralPartialEq for Duration
Auto Trait Implementations§
impl Freeze for Duration
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnwindSafe for Duration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<A> ObjectKey for Awhere
A: KeyFieldValue,
impl<A> ObjectKey for Awhere
A: KeyFieldValue,
Source§fn encode<'a>(
key: &<A as ObjectValue>::In<'a>,
writer: &mut ReverseSliceWriter<'_>,
) -> Result<(), EncodeError>
fn encode<'a>( key: &<A as ObjectValue>::In<'a>, writer: &mut ReverseSliceWriter<'_>, ) -> Result<(), EncodeError>
Encode the key.
Source§fn decode<'a>(
input: &'a [u8],
memory_manager: &'a MemoryManager,
) -> Result<<A as ObjectValue>::Out<'a>, DecodeError>
fn decode<'a>( input: &'a [u8], memory_manager: &'a MemoryManager, ) -> Result<<A as ObjectValue>::Out<'a>, DecodeError>
Decode the key.
Source§impl<A> ObjectValue for Awhere
A: ObjectFieldValue,
impl<A> ObjectValue for Awhere
A: ObjectFieldValue,
Source§const PSEUDO_TYPE: StructType<'static>
const PSEUDO_TYPE: StructType<'static>
The associated “pseudo-struct” type for the object value.
Source§type FieldTypes<'a> = (<<A as ObjectFieldValue>::In<'a> as SchemaValue<'a>>::Type,)
type FieldTypes<'a> = (<<A as ObjectFieldValue>::In<'a> as SchemaValue<'a>>::Type,)
The object value types as field types.
Source§type In<'a> = <A as ObjectFieldValue>::In<'a>
type In<'a> = <A as ObjectFieldValue>::In<'a>
The type that is used when inputting object values to functions.
Source§type Out<'a> = <A as ObjectFieldValue>::Out<'a>
type Out<'a> = <A as ObjectFieldValue>::Out<'a>
The type that is used in function return values.
Source§fn encode<'a>(
value: &<A as ObjectValue>::In<'a>,
encoder: &mut dyn Encoder,
) -> Result<(), EncodeError>
fn encode<'a>( value: &<A as ObjectValue>::In<'a>, encoder: &mut dyn Encoder, ) -> Result<(), EncodeError>
Encode each part of the value in reverse order.
Source§fn decode<'a>(
decoder: &mut dyn Decoder<'a>,
mem: &'a MemoryManager,
) -> Result<<A as ObjectValue>::Out<'a>, DecodeError>
fn decode<'a>( decoder: &mut dyn Decoder<'a>, mem: &'a MemoryManager, ) -> Result<<A as ObjectValue>::Out<'a>, DecodeError>
Decode the value from the decoder.
Source§impl<'a, V> OptionalValue<'a> for Vwhere
V: SchemaValue<'a>,
impl<'a, V> OptionalValue<'a> for Vwhere
V: SchemaValue<'a>,
Source§fn decode_value(
cdc: &dyn Codec,
data: &'a [u8],
memory_manager: &'a MemoryManager,
) -> Result<<V as OptionalValue<'a>>::Value, DecodeError>
fn decode_value( cdc: &dyn Codec, data: &'a [u8], memory_manager: &'a MemoryManager, ) -> Result<<V as OptionalValue<'a>>::Value, DecodeError>
Decode the value.
Source§fn encode_value<'b>(
cdc: &dyn Codec,
value: &<V as OptionalValue<'a>>::Value,
writer_factory: &'b dyn WriterFactory,
) -> Result<Option<&'b [u8]>, EncodeError>
fn encode_value<'b>( cdc: &dyn Codec, value: &<V as OptionalValue<'a>>::Value, writer_factory: &'b dyn WriterFactory, ) -> Result<Option<&'b [u8]>, EncodeError>
Encode the value.