Struct diem_types::event::EventKey [−][src]
pub struct EventKey(_);
Expand description
A struct that represents a globally unique id for an Event stream that a user can listen to. By design, the lower part of EventKey is the same as account address.
Implementations
impl EventKey
[src]
impl EventKey
[src]pub fn get_creator_address(&self) -> AccountAddress
[src]
pub fn get_creator_address(&self) -> AccountAddress
[src]Get the account address part in this event key
pub fn get_creation_number(&self) -> u64
[src]
pub fn get_creation_number(&self) -> u64
[src]If this is the ith
EventKeycreated by
get_creator_address(), return
i`
pub fn new_from_address(addr: &AccountAddress, salt: u64) -> Self
[src]
pub fn new_from_address(addr: &AccountAddress, salt: u64) -> Self
[src]Create a unique handle by using an AccountAddress and a counter.
pub fn from_hex<T: AsRef<[u8]>>(hex: T) -> Result<Self, EventKeyParseError>
[src]
pub fn from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, EventKeyParseError>
[src]
Trait Implementations
impl<'de> Deserialize<'de> for EventKey
[src]
impl<'de> Deserialize<'de> for EventKey
[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl FromStr for EventKey
[src]
impl FromStr for EventKey
[src]type Err = EventKeyParseError
type Err = EventKeyParseError
The associated error which can be returned from parsing.
impl Ord for EventKey
[src]
impl Ord for EventKey
[src]impl PartialOrd<EventKey> for EventKey
[src]
impl PartialOrd<EventKey> for EventKey
[src]fn partial_cmp(&self, other: &EventKey) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &EventKey) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl TryFrom<&'_ [u8]> for EventKey
[src]
impl TryFrom<&'_ [u8]> for EventKey
[src]fn try_from(bytes: &[u8]) -> Result<EventKey, EventKeyParseError>
[src]
fn try_from(bytes: &[u8]) -> Result<EventKey, EventKeyParseError>
[src]Tries to convert the provided byte array into Event Key.
type Error = EventKeyParseError
type Error = EventKeyParseError
The type returned in the event of a conversion error.
impl Copy for EventKey
[src]
impl Eq for EventKey
[src]
impl StructuralEq for EventKey
[src]
impl StructuralPartialEq for EventKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for EventKey
impl Send for EventKey
impl Sync for EventKey
impl Unpin for EventKey
impl UnwindSafe for EventKey
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
[src]
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
[src]pub fn test_only_hash(&self) -> HashValue
[src]
pub fn test_only_hash(&self) -> HashValue
[src]Generates a hash used only for tests.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,