pub struct Event {
pub abi_version: AbiVersion,
pub name: Arc<str>,
pub inputs: Arc<[NamedAbiType]>,
pub id: u32,
}Expand description
Contract event ABI definition.
Fields§
§abi_version: AbiVersionABI version (same as contract ABI version).
name: Arc<str>Event name.
inputs: Arc<[NamedAbiType]>Event arguments.
id: u32Event id derived from signature.
Implementations§
Source§impl Event
impl Event
Sourcepub fn compute_event_id(
abi_version: AbiVersion,
name: &str,
inputs: &[NamedAbiType],
) -> u32
pub fn compute_event_id( abi_version: AbiVersion, name: &str, inputs: &[NamedAbiType], ) -> u32
Computes event id from the full event signature.
Sourcepub fn builder<T: Into<String>>(
abi_version: AbiVersion,
name: T,
) -> EventBuilder
pub fn builder<T: Into<String>>( abi_version: AbiVersion, name: T, ) -> EventBuilder
Returns an event builder with the specified ABI version and name.
Sourcepub fn encode_internal_input(
&self,
tokens: &[NamedAbiValue],
) -> Result<CellBuilder>
pub fn encode_internal_input( &self, tokens: &[NamedAbiValue], ) -> Result<CellBuilder>
Encodes a message body with this event as an internal message.
Sourcepub fn decode_internal_input(
&self,
slice: CellSlice<'_>,
) -> Result<Vec<NamedAbiValue>>
pub fn decode_internal_input( &self, slice: CellSlice<'_>, ) -> Result<Vec<NamedAbiValue>>
Tries to parse input arguments for this event from an internal message body.
NOTE: The slice is required to contain nothing other than these arguments.
Sourcepub fn decode_internal_input_ext(
&self,
slice: &mut CellSlice<'_>,
allow_partial: bool,
) -> Result<Vec<NamedAbiValue>>
pub fn decode_internal_input_ext( &self, slice: &mut CellSlice<'_>, allow_partial: bool, ) -> Result<Vec<NamedAbiValue>>
Tries to parse input arguments for this event from an internal message body.
Sourcepub fn display_signature(&self) -> impl Display + '_
pub fn display_signature(&self) -> impl Display + '_
Returns an object which can be used to display the normalized signature of this event.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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