pub struct MessageSpec<F: Form = MetaForm> { /* private fields */ }Expand description
Describes a contract message.
Implementations§
Source§impl MessageSpec
impl MessageSpec
Sourcepub fn from_name(
name: &'static str,
) -> MessageSpecBuilder<Missing<Selector>, Missing<Mutates>, Missing<IsPayable>, Missing<Returns>>
pub fn from_name( name: &'static str, ) -> MessageSpecBuilder<Missing<Selector>, Missing<Mutates>, Missing<IsPayable>, Missing<Returns>>
Creates a new message spec builder.
Sourcepub fn from_trait_and_name(
trait_name: &'static str,
message_name: &'static str,
) -> MessageSpecBuilder<Missing<Selector>, Missing<Mutates>, Missing<IsPayable>, Missing<Returns>>
pub fn from_trait_and_name( trait_name: &'static str, message_name: &'static str, ) -> MessageSpecBuilder<Missing<Selector>, Missing<Mutates>, Missing<IsPayable>, Missing<Returns>>
Creates a new message spec builder for a trait provided message.
Source§impl<F> MessageSpec<F>where
F: Form,
impl<F> MessageSpec<F>where
F: Form,
Sourcepub fn name(&self) -> &[F::String]
pub fn name(&self) -> &[F::String]
Returns the name of the message and some optional prefixes.
In case of trait provided messages and constructors the prefix by convention in pro! is the name of the trait.
Sourcepub fn mutates(&self) -> bool
pub fn mutates(&self) -> bool
Returns true if the message is allowed to mutate the contract state.
Sourcepub fn args(&self) -> &[MessageParamSpec<F>]
pub fn args(&self) -> &[MessageParamSpec<F>]
Returns the parameters of the message.
Sourcepub fn return_type(&self) -> &ReturnTypeSpec<F>
pub fn return_type(&self) -> &ReturnTypeSpec<F>
Returns the return type of the message.
Trait Implementations§
Source§impl<'de, F: Form> Deserialize<'de> for MessageSpec<F>
impl<'de, F: Form> Deserialize<'de> for MessageSpec<F>
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 IntoPortable for MessageSpec
impl IntoPortable for MessageSpec
Source§type Output = MessageSpec<PortableForm>
type Output = MessageSpec<PortableForm>
The portable version of
Self.Source§fn into_portable(self, registry: &mut Registry) -> Self::Output
fn into_portable(self, registry: &mut Registry) -> Self::Output
Convert
self to the portable form by using the registry for caching.Source§impl<F: Form> Serialize for MessageSpec<F>
impl<F: Form> Serialize for MessageSpec<F>
impl<F: Eq + Form> Eq for MessageSpec<F>
impl<F: Form> StructuralPartialEq for MessageSpec<F>
Auto Trait Implementations§
impl<F> Freeze for MessageSpec<F>
impl<F> RefUnwindSafe for MessageSpec<F>
impl<F> Send for MessageSpec<F>
impl<F> Sync for MessageSpec<F>
impl<F> Unpin for MessageSpec<F>
impl<F> UnwindSafe for MessageSpec<F>
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