pub struct Event {
pub event_content: EventContent,
pub signature: Signature,
}
Expand description
Event associated to a subject.
Fields
event_content: EventContent
signature: Signature
Implementations
impl Event
impl Event
pub fn new(
event_content: EventContent,
signature: Signature
) -> Result<Event, CryptoErrorEvent>
pub fn get_event_content_hash(&self) -> Result<DigestIdentifier, Error>
Trait Implementations
impl BorshDeserialize for Eventwhere
EventContent: BorshDeserialize,
Signature: BorshDeserialize,
impl BorshDeserialize for Eventwhere
EventContent: BorshDeserialize,
Signature: BorshDeserialize,
fn deserialize(buf: &mut &[u8]) -> Result<Event, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Event, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes. Read more
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
impl BorshSerialize for Eventwhere
EventContent: BorshSerialize,
Signature: BorshSerialize,
impl BorshSerialize for Eventwhere
EventContent: BorshSerialize,
Signature: BorshSerialize,
impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
fn deserialize<D>(
deserializer: D
) -> Result<Event, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Event, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Serialize for Event
impl Serialize for Event
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 ToSchema for Event
impl ToSchema for Event
impl Eq for Event
impl StructuralEq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.