Struct ink_metadata::EventSpec
source · pub struct EventSpec<F: Form = MetaForm> { /* private fields */ }
Expand description
Describes an event definition.
Implementations§
source§impl<F> EventSpec<F>where
F: Form,
F::String: Default,
impl<F> EventSpec<F>where
F: Form,
F::String: Default,
sourcepub fn new(label: <F as Form>::String) -> EventSpecBuilder<F>
pub fn new(label: <F as Form>::String) -> EventSpecBuilder<F>
Creates a new event specification builder.
source§impl<F> EventSpec<F>where
F: Form,
impl<F> EventSpec<F>where
F: Form,
sourcepub fn args(&self) -> &[EventParamSpec<F>]
pub fn args(&self) -> &[EventParamSpec<F>]
The event arguments.
sourcepub fn signature_topic(&self) -> Option<&SignatureTopic>
pub fn signature_topic(&self) -> Option<&SignatureTopic>
The signature topic of the event. None
if the event is anonymous.
Trait Implementations§
source§impl<'de, F: Form> Deserialize<'de> for EventSpec<F>where
F::Type: DeserializeOwned,
F::String: DeserializeOwned,
impl<'de, F: Form> Deserialize<'de> for EventSpec<F>where
F::Type: DeserializeOwned,
F::String: DeserializeOwned,
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
source§impl<F: Form + JsonSchema> JsonSchema for EventSpec<F>
impl<F: Form + JsonSchema> JsonSchema for EventSpec<F>
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl<F: PartialEq + Form> PartialEq for EventSpec<F>where
F::String: PartialEq,
impl<F: PartialEq + Form> PartialEq for EventSpec<F>where
F::String: PartialEq,
impl<F: Eq + Form> Eq for EventSpec<F>where
F::String: Eq,
impl<F: Form> StructuralPartialEq for EventSpec<F>
Auto Trait Implementations§
impl<F> Freeze for EventSpec<F>where
<F as Form>::String: Freeze,
impl<F> RefUnwindSafe for EventSpec<F>where
<F as Form>::String: RefUnwindSafe,
<F as Form>::Type: RefUnwindSafe,
impl<F> Send for EventSpec<F>
impl<F> Sync for EventSpec<F>
impl<F> Unpin for EventSpec<F>
impl<F> UnwindSafe for EventSpec<F>where
<F as Form>::String: UnwindSafe,
<F as Form>::Type: UnwindSafe,
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