Enum blaze_pk::TdfOptional
source · [−]Variants
Some(u8, (String, T))
None
Implementations
sourceimpl<T: Codec> TdfOptional<T>
impl<T: Codec> TdfOptional<T>
sourcepub fn default_some(tag: &str, value: T) -> TdfOptional<T>
pub fn default_some(tag: &str, value: T) -> TdfOptional<T>
Function for choosing a some value with a default type
Trait Implementations
sourceimpl<T: Codec> Codec for TdfOptional<T>
impl<T: Codec> Codec for TdfOptional<T>
sourcefn encode(&self, output: &mut Vec<u8>)
fn encode(&self, output: &mut Vec<u8>)
Function for implementing encoding of Self to the
provided vec of bytes Read more
sourcefn decode(reader: &mut Reader<'_>) -> CodecResult<Self>
fn decode(reader: &mut Reader<'_>) -> CodecResult<Self>
Function for implementing decoding of Self from
the provided Reader. Will return None if self
cannot be decoded Read more
sourcefn value_type() -> ValueType
fn value_type() -> ValueType
Optional additional specifier for Tdf types that
tells which type this is Read more
sourcefn skip(reader: &mut Reader<'_>) -> CodecResult<()>
fn skip(reader: &mut Reader<'_>) -> CodecResult<()>
Function to provide functionality for skipping this
data type (e.g. read the bytes without using them) Read more
sourcefn encode_bytes(&self) -> Vec<u8>
fn encode_bytes(&self) -> Vec<u8>
Shortcut function for encoding self directly to
a Vec of bytes Read more
sourceimpl<T: Debug + Codec> Debug for TdfOptional<T>
impl<T: Debug + Codec> Debug for TdfOptional<T>
sourceimpl<T: PartialEq + Codec> PartialEq<TdfOptional<T>> for TdfOptional<T>
impl<T: PartialEq + Codec> PartialEq<TdfOptional<T>> for TdfOptional<T>
sourcefn eq(&self, other: &TdfOptional<T>) -> bool
fn eq(&self, other: &TdfOptional<T>) -> bool
impl<T: Eq + Codec> Eq for TdfOptional<T>
impl<T: Codec> StructuralEq for TdfOptional<T>
impl<T: Codec> StructuralPartialEq for TdfOptional<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for TdfOptional<T>where
T: RefUnwindSafe,
impl<T> Send for TdfOptional<T>where
T: Send,
impl<T> Sync for TdfOptional<T>where
T: Sync,
impl<T> Unpin for TdfOptional<T>where
T: Unpin,
impl<T> UnwindSafe for TdfOptional<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more