pub struct SignedEvent {
pub event: Event,
pub signatures: Vec<IndexedSignature>,
}Expand description
An event paired with its detached signature(s).
Per the KERI spec, signatures are NOT part of the event body. They are attached externally (CESR attachment codes in streams, or stored alongside in databases). The event body is what gets hashed for the SAID.
Usage:
ⓘ
use auths_keri::{SignedEvent, IndexedSignature, Event};
// After creating and finalizing an event:
let signed = SignedEvent::new(event, vec![IndexedSignature { index: 0, sig: sig_bytes }]);Fields§
§event: EventThe event body (no signature data).
signatures: Vec<IndexedSignature>Controller-indexed signatures (detached from body).
Implementations§
Source§impl SignedEvent
impl SignedEvent
Sourcepub fn new(event: Event, signatures: Vec<IndexedSignature>) -> Self
pub fn new(event: Event, signatures: Vec<IndexedSignature>) -> Self
Create a new signed event from an event and its signatures.
Sourcepub fn sequence(&self) -> KeriSequence
pub fn sequence(&self) -> KeriSequence
Get the sequence number of the inner event.
Trait Implementations§
Source§impl Clone for SignedEvent
impl Clone for SignedEvent
Source§fn clone(&self) -> SignedEvent
fn clone(&self) -> SignedEvent
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 SignedEvent
impl Debug for SignedEvent
Source§impl<'de> Deserialize<'de> for SignedEvent
impl<'de> Deserialize<'de> for SignedEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SignedEvent
Source§impl PartialEq for SignedEvent
impl PartialEq for SignedEvent
Source§impl Serialize for SignedEvent
impl Serialize for SignedEvent
impl StructuralPartialEq for SignedEvent
Auto Trait Implementations§
impl Freeze for SignedEvent
impl RefUnwindSafe for SignedEvent
impl Send for SignedEvent
impl Sync for SignedEvent
impl Unpin for SignedEvent
impl UnsafeUnpin for SignedEvent
impl UnwindSafe for SignedEvent
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.