pub trait EpeeValue: Sized {
const MARKER: Marker;
// Required methods
fn read<B: Buf>(
r: &mut B,
marker: &Marker,
limits: EpeeValueLimits,
) -> Result<Self>;
fn write<B: BufMut>(self, w: &mut B) -> Result<()>;
// Provided methods
fn should_write(&self) -> bool { ... }
fn epee_default_value() -> Option<Self> { ... }
}Expand description
A trait for epee values.
All EpeeObject objects automatically implement EpeeValue.
Required Associated Constants§
Required Methods§
fn read<B: Buf>( r: &mut B, marker: &Marker, limits: EpeeValueLimits, ) -> Result<Self>
fn write<B: BufMut>(self, w: &mut B) -> Result<()>
Provided Methods§
fn should_write(&self) -> bool
Sourcefn epee_default_value() -> Option<Self>
fn epee_default_value() -> Option<Self>
This is different than default field values and instead is the default value of a whole type.
For example a Vec has a default value of a zero length vec as when a
sequence has no entries it is not encoded.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".