pub struct NoDefault;Expand description
A pseudo-field that cannot be written (returns an error at runtime)
This is useful for types that do not have a default representation (e.g. PT_DYN types)
Note: all event fields are generated as Option<T>, so there is always a possibility
that we get to write a default value for a field that does not have one.
Trait Implementations§
Source§impl ToBytes for NoDefault
impl ToBytes for NoDefault
Source§fn binary_size(&self) -> usize
fn binary_size(&self) -> usize
Return the number of bytes needed to store the field
Source§fn write<W>(&self, _writer: W) -> Result<(), Error>where
W: Write,
fn write<W>(&self, _writer: W) -> Result<(), Error>where
W: Write,
Write the binary representation to
writerSource§fn default_repr() -> impl ToBytes
fn default_repr() -> impl ToBytes
Return the default representation for the field type Read more
Auto Trait Implementations§
impl Freeze for NoDefault
impl RefUnwindSafe for NoDefault
impl Send for NoDefault
impl Sync for NoDefault
impl Unpin for NoDefault
impl UnwindSafe for NoDefault
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