Skip to main content

SerderKERI

Struct SerderKERI 

Source
pub struct SerderKERI {
    pub base: BaseSerder,
}
Expand description

KERI-specific implementation of the Serder

Fields§

§base: BaseSerder

Implementations§

Source§

impl SerderKERI

Source

pub fn new( raw: Option<&[u8]>, sad: Option<&Sadder>, makify: Option<bool>, smellage: Option<Smellage>, proto: Option<String>, vrsn: Option<Versionage>, kind: Option<Kinds>, ilk: Option<Ilk>, saids: Option<HashMap<&str, String>>, ) -> Result<Self, KERIError>

Source

pub fn from_sad(sad: &Sadder) -> Result<Self, KERIError>

Creates a new SerderKERI by constructing its BaseSerder from a sad.

Source

pub fn from_sad_and_saids( sad: &Sadder, saids: Option<HashMap<&str, String>>, ) -> Result<Self, KERIError>

Source

pub fn estive(&self) -> bool

Returns true if Serder represents an establishment event

Source

pub fn ked(&self) -> Sadder

Returns key event dict property getter. Alias for .sad

Source

pub fn pre(&self) -> Option<String>

Returns qb64 of .sad[“i”] identifier prefix

Source

pub fn preb(&self) -> Option<Vec<u8>>

Returns qb64b of .pre identifier prefix as bytes

Source

pub fn sner(&self) -> Option<Number>

Number instance of sequence number

Source

pub fn sn(&self) -> Option<u64>

Sequence number as integer

Source

pub fn snh(&self) -> Option<String>

Sequence number as hex string

Source

pub fn seals(&self) -> Option<Vec<IndexMap<String, SadValue>>>

Seals from .sad[“a”]

Source

pub fn traits(&self) -> Option<SadValue>

Traits list (config traits) from .sad[“c”]

Source

pub fn tholder(&self) -> Option<Tholder>

Tholder instance as converted from .sad[‘kt’]

Source

pub fn keys(&self) -> Option<Vec<String>>

List of qb64 keys from .sad[‘k’]

Source

pub fn verfers(&self) -> Option<Vec<Verfer>>

List of Verfer instances as converted from .sad[‘k’]

Source

pub fn ntholder(&self) -> Option<Tholder>

Tholder instance as converted from .sad[‘nt’]

Source

pub fn ndigs(&self) -> Option<Vec<String>>

Next key digests from .sad[‘n’]

Source

pub fn ndigers(&self) -> Option<Vec<Diger>>

List of Diger instances as converted from .sad[‘n’]

Source

pub fn bner(&self) -> Option<Number>

Number of backer TOAD threshold

Source

pub fn bn(&self) -> Option<u64>

Backer TOAD number as integer

Source

pub fn backs(&self) -> Option<Vec<String>>

Backers list from .sad[‘b’]

Source

pub fn berfers(&self) -> Option<Vec<Verfer>>

List of Verfer instances as converted from .sad[‘b’]

Source

pub fn prior(&self) -> Option<String>

Prior event SAID from .sad[‘p’]

Source

pub fn priorb(&self) -> Option<Vec<u8>>

Prior event SAID as bytes

Source

pub fn cuts(&self) -> Option<Vec<String>>

List of backers to be cut (removed) from .sad[‘br’]

Source

pub fn adds(&self) -> Option<Vec<String>>

List of backers to be added from .sad[‘ba’]

Source

pub fn delpre(&self) -> Option<String>

Delegator ID prefix from .sad[“di”]

Source

pub fn delpreb(&self) -> Option<Vec<u8>>

Delegator ID prefix as bytes

Source

pub fn stamp(&self) -> Option<String>

Date-time-stamp from .sad[“dt”]

Source

pub fn uuid(&self) -> Option<String>

UUID (salty nonce) from .sad[“u”]

Source

pub fn nonce(&self) -> Option<String>

Alias for .uuid property with version check

Source

pub fn ilk(&self) -> Option<Ilk>

Get the ilk of the event

Source

pub fn compare_said(&self, said: &str) -> bool

Trait Implementations§

Source§

impl Clone for SerderKERI

Source§

fn clone(&self) -> SerderKERI

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SerderKERI

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Rawifiable for SerderKERI

Source§

fn from_raw(raw: &[u8], smell: Option<Smellage>) -> Result<Self, KERIError>

Creates a new SerderKERI by constructing its BaseSerder from raw bytes.

Source§

impl Serder for SerderKERI

Implement the Serder trait for SerderKERI

Source§

fn pretty(&self, size: Option<usize>) -> String

Returns a pretty-printed JSON representation of the serialized data Read more
Source§

fn raw(&self) -> &[u8] ⓘ

Returns the raw bytes representation
Source§

fn sad(&self) -> Sadder

Returns a copy of the serializable attribute dictionary (saidified data)
Source§

fn genus(&self) -> &str

Returns the CESR genus code for this Serder
Source§

fn gvrsn(&self) -> &Versionage

Returns the CESR genus code table version for this Serder
Source§

fn kind(&self) -> &Kinds

Returns the serialization kind (value of Serials/Serialage)
Source§

fn proto(&self) -> &str

Returns the protocol identifier type (e.g., ‘KERI’ or ‘ACDC’)
Source§

fn vrsn(&self) -> &Versionage

Returns the protocol version for this Serder
Source§

fn size(&self) -> usize

Returns the number of bytes in the raw representation
Source§

fn said(&self) -> Option<&str>

Returns the qb64 SAID (Self-Addressing IDentifier)
Source§

fn ilk(&self) -> Option<&str>

Returns the packet type given by sad[‘t’] if any
Source§

fn as_any(&self) -> &dyn Any

Source§

fn clone_box(&self) -> Box<dyn Serder>

Source§

fn protocol(&self) -> &str

Alias for proto() - returns the protocol identifier type
Source§

fn version(&self) -> &Versionage

Alias for vrsn() - returns the protocol version
Source§

fn saidb(&self) -> Option<Vec<u8>>

Returns the qb64b (bytes) representation of the SAID
Source§

impl Verifiable for SerderKERI

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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