pub struct ClaimEvent {
pub user: Address,
pub staking_config: Address,
pub reward_mint: Address,
pub amount: u64,
pub timestamp: i64,
}Fields§
§user: Address§staking_config: Address§reward_mint: Address§amount: u64§timestamp: i64Implementations§
Source§impl ClaimEvent
impl ClaimEvent
Sourcepub fn matches(program_id: &Address, data: &[u8]) -> bool
pub fn matches(program_id: &Address, data: &[u8]) -> bool
Anchor discriminators are derived from names alone, so identical bytes recur across programs and the bytes alone cannot tell this event from a foreign one.
Sourcepub fn try_parse(
program_id: &Address,
data: &[u8],
) -> Option<Result<Self, Error>>
pub fn try_parse( program_id: &Address, data: &[u8], ) -> Option<Result<Self, Error>>
None when Self::matches is false; Some(Err(_)) when it matches but the body fails
to deserialize. Use Option::transpose to propagate the failure with ?.
Trait Implementations§
Source§impl BorshDeserialize for ClaimEvent
impl BorshDeserialize for ClaimEvent
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§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.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for ClaimEvent
impl BorshSerialize for ClaimEvent
Source§impl Clone for ClaimEvent
impl Clone for ClaimEvent
Source§impl Debug for ClaimEvent
impl Debug for ClaimEvent
Source§impl<'de> Deserialize<'de> for ClaimEvent
impl<'de> Deserialize<'de> for ClaimEvent
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 ClaimEvent
Source§impl PartialEq for ClaimEvent
impl PartialEq for ClaimEvent
Source§impl Serialize for ClaimEvent
impl Serialize for ClaimEvent
impl StructuralPartialEq for ClaimEvent
Auto Trait Implementations§
impl Freeze for ClaimEvent
impl RefUnwindSafe for ClaimEvent
impl Send for ClaimEvent
impl Sync for ClaimEvent
impl Unpin for ClaimEvent
impl UnsafeUnpin for ClaimEvent
impl UnwindSafe for ClaimEvent
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