Skip to main content

CatCesrSuberBase

Struct CatCesrSuberBase 

Source
pub struct CatCesrSuberBase<M: Matter> {
    pub base: CesrSuberBase<M>,
    pub formats: Vec<String>,
}

Fields§

§base: CesrSuberBase<M>§formats: Vec<String>

Implementations§

Source§

impl<M: Matter + Parsable> CatCesrSuberBase<M>

Source

pub fn new( db: Arc<LMDBer>, subkey: &str, formats: Vec<String>, sep: Option<u8>, verify: bool, ) -> Result<Self, SuberError>

Creates a new CatCesrSuberBase

Parameters:

  • db: The base LMDB database
  • subkey: The key for the sub-database
  • formats: Array of format strings that determine which serialization/deserialization methods to use
  • sep: Optional separator for keys
  • verify: Whether to verify data when deserializing
Source

pub fn ser(&self, val: &[&dyn Matter]) -> Result<Vec<u8>, SuberError>

Generic serialization dispatch method that handles any Matter type but with specific logic for the supported format types

Source

pub fn des(&self, val: &[u8]) -> Result<Vec<Box<dyn Matter>>, SuberError>

Generic deserialization dispatch method that handles any Matter type but with specific logic for the supported format types

Source

pub fn ser_from_siger(&self, siger: &Siger) -> Result<Vec<u8>, SuberError>

Serializes from a Siger to bytes

Source

pub fn des_to_siger( &self, val: &[u8], ) -> Result<Vec<Box<dyn Matter>>, SuberError>

Deserializes from bytes to a Siger

Source

pub fn ser_from_seqner_saider( &self, seqner: &dyn Matter, saider: &dyn Matter, ) -> Result<Vec<u8>, SuberError>

Serializes from a tuple of (Seqner, Saider) to bytes

Source

pub fn des_to_seqner_saider( &self, val: &[u8], ) -> Result<Vec<Box<dyn Matter>>, SuberError>

Deserializes from bytes to a tuple of (Seqner, Saider)

Source

pub fn ser_from_verfer_cigar( &self, verfer: &dyn Matter, cigar: &dyn Matter, ) -> Result<Vec<u8>, SuberError>

Serializes from a tuple of (Verfer, Cigar) to bytes

Source

pub fn des_to_verfer_cigar( &self, val: &[u8], ) -> Result<Vec<Box<dyn Matter>>, SuberError>

Deserializes from bytes to a tuple of (Verfer, Cigar)

Source

pub fn ser_from_number_saider( &self, number: &dyn Matter, saider: &dyn Matter, ) -> Result<Vec<u8>, SuberError>

Serializes from a tuple of (Number, Saider) to bytes

Source

pub fn des_to_number_saider( &self, val: &[u8], ) -> Result<Vec<Box<dyn Matter>>, SuberError>

Deserializes from bytes to a tuple of (Number, Saider)

Source

pub fn ser_from_prefixer_seqner( &self, prefixer: &dyn Matter, seqner: &dyn Matter, ) -> Result<Vec<u8>, SuberError>

Serializes from a tuple of (Prefixer, Seqner) to bytes

Source

pub fn des_to_prefixer_seqner( &self, val: &[u8], ) -> Result<Vec<Box<dyn Matter>>, SuberError>

Deserializes from bytes to a tuple of (Prefixer, Seqner)

Source

pub fn ser_from_seqner_diger( &self, seqner: &dyn Matter, diger: &dyn Matter, ) -> Result<Vec<u8>, SuberError>

Serializes from a tuple of (Seqner, Diger) to bytes

Source

pub fn des_to_seqner_diger( &self, val: &[u8], ) -> Result<Vec<Box<dyn Matter>>, SuberError>

Deserializes from bytes to a tuple of (Seqner, Diger)

Source

pub fn ser_from_dater_seqner_diger( &self, dater: &dyn Matter, seqner: &dyn Matter, diger: &dyn Matter, ) -> Result<Vec<u8>, SuberError>

Serializes from a tuple of (Dater, Seqner, Diger) to bytes

Source

pub fn des_to_dater_seqner_diger( &self, val: &[u8], ) -> Result<Vec<Box<dyn Matter>>, SuberError>

Deserializes from bytes to a tuple of (Dater, Seqner, Diger)

Source

pub fn ser_from_prefixer_seqner_saider( &self, prefixer: &dyn Matter, seqner: &dyn Matter, saider: &dyn Matter, ) -> Result<Vec<u8>, SuberError>

Serializes from a tuple of (Dater, Seqner, Diger) to bytes

Source

pub fn des_to_prefixer_seqner_saider( &self, val: &[u8], ) -> Result<Vec<Box<dyn Matter>>, SuberError>

Deserializes from bytes to a tuple of (Dater, Seqner, Diger)

Auto Trait Implementations§

§

impl<M> Freeze for CatCesrSuberBase<M>

§

impl<M> RefUnwindSafe for CatCesrSuberBase<M>
where M: RefUnwindSafe,

§

impl<M> Send for CatCesrSuberBase<M>
where M: Send,

§

impl<M> Sync for CatCesrSuberBase<M>
where M: Sync,

§

impl<M> Unpin for CatCesrSuberBase<M>
where M: Unpin,

§

impl<M> UnsafeUnpin for CatCesrSuberBase<M>

§

impl<M> UnwindSafe for CatCesrSuberBase<M>
where M: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more