Struct sp_wasm_interface::Signature
source · pub struct Signature {
pub args: Cow<'static, [ValueType]>,
pub return_value: Option<ValueType>,
}
Expand description
The Signature of a function
Fields§
§args: Cow<'static, [ValueType]>
The arguments of a function.
return_value: Option<ValueType>
The optional return value of a function.
Implementations§
source§impl Signature
impl Signature
sourcepub fn new<T: Into<Cow<'static, [ValueType]>>>(
args: T,
return_value: Option<ValueType>
) -> Self
pub fn new<T: Into<Cow<'static, [ValueType]>>>( args: T, return_value: Option<ValueType> ) -> Self
Create a new instance of Signature
.
sourcepub fn new_with_args<T: Into<Cow<'static, [ValueType]>>>(args: T) -> Self
pub fn new_with_args<T: Into<Cow<'static, [ValueType]>>>(args: T) -> Self
Create a new instance of Signature
with the given args
and without any return value.
Trait Implementations§
source§impl PartialEq<Signature> for Signature
impl PartialEq<Signature> for Signature
impl Eq for Signature
impl StructuralEq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.