Struct cap_sdk_core::transaction::Event
source · [−]pub struct Event {
pub time: u64,
pub caller: Principal,
pub operation: String,
pub details: Vec<(String, DetailValue), Global>,
}Fields
time: u64The timestamp in ms.
caller: PrincipalThe caller that initiated the call on the token contract.
operation: StringThe operation that took place.
details: Vec<(String, DetailValue), Global>Details of the transaction.
Implementations
sourceimpl Event
impl Event
sourcepub fn extract_principal_ids(&self) -> BTreeSet<&Principal>
pub fn extract_principal_ids(&self) -> BTreeSet<&Principal>
Return a set containing all of the Principal IDs involved in an event.
sourcepub fn extract_token_ids(&self) -> BTreeSet<u64>
pub fn extract_token_ids(&self) -> BTreeSet<u64>
Return a set containing all of the token ids involved in an event.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
sourcefn 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
sourceimpl Into<IndefiniteEvent> for Event
impl Into<IndefiniteEvent> for Event
sourcefn into(self) -> IndefiniteEvent
fn into(self) -> IndefiniteEvent
Converts this type into the (usually inferred) input type.
sourceimpl Serialize for Event
impl Serialize for Event
sourcefn 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
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more