pub struct VersionString {
pub kind: String,
pub size: u32,
}Expand description
KERI v1.x version string: KERI10JSON{hhhhhh}_ (17 chars).
The size field is the total serialized byte count of the event.
Usage:
use auths_keri::VersionString;
let vs = VersionString::json(256);
assert_eq!(vs.to_string(), "KERI10JSON000100_");Fields§
§kind: StringSerialization kind (e.g., “JSON”, “CBOR”).
size: u32Serialized byte count.
Implementations§
Source§impl VersionString
impl VersionString
Sourcepub fn json(size: u32) -> VersionString
pub fn json(size: u32) -> VersionString
Create a version string for JSON serialization with the given byte count.
Sourcepub fn placeholder() -> VersionString
pub fn placeholder() -> VersionString
Create a placeholder version string (size = 0, to be updated after serialization).
Trait Implementations§
Source§impl Clone for VersionString
impl Clone for VersionString
Source§fn clone(&self) -> VersionString
fn clone(&self) -> VersionString
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VersionString
impl Debug for VersionString
Source§impl Default for VersionString
impl Default for VersionString
Source§fn default() -> VersionString
fn default() -> VersionString
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VersionString
impl<'de> Deserialize<'de> for VersionString
Source§fn deserialize<D>(
deserializer: D,
) -> Result<VersionString, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<VersionString, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for VersionString
impl Display for VersionString
impl Eq for VersionString
Source§impl PartialEq for VersionString
impl PartialEq for VersionString
Source§fn eq(&self, other: &VersionString) -> bool
fn eq(&self, other: &VersionString) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for VersionString
impl Serialize for VersionString
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for VersionString
Auto Trait Implementations§
impl Freeze for VersionString
impl RefUnwindSafe for VersionString
impl Send for VersionString
impl Sync for VersionString
impl Unpin for VersionString
impl UnsafeUnpin for VersionString
impl UnwindSafe for VersionString
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.