pub struct Parameters<'a>(/* private fields */);
Expand description
Data that forms part of a contract or a delegate along with the WebAssembly code.
This is supplied to the contract as a parameter to the contract’s functions. Parameters are typically be used to configure a contract, much like the parameters of a constructor function.
Implementations§
Source§impl Parameters<'_>
impl Parameters<'_>
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Returns the bytes of parameters.
Sourcepub fn into_owned(self) -> Parameters<'static>
pub fn into_owned(self) -> Parameters<'static>
Copies the data if not owned and returns an owned version of self.
pub fn deser_params<'de, D>(deser: D) -> Result<Parameters<'static>, D::Error>where
D: Deserializer<'de>,
Trait Implementations§
Source§impl AsRef<[u8]> for Parameters<'_>
impl AsRef<[u8]> for Parameters<'_>
Source§impl<'a> Clone for Parameters<'a>
impl<'a> Clone for Parameters<'a>
Source§fn clone(&self) -> Parameters<'a>
fn clone(&self) -> Parameters<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for Parameters<'a>
impl<'a> Debug for Parameters<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for Parameters<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Parameters<'a>
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<'a> From<&'a [u8]> for Parameters<'a>
impl<'a> From<&'a [u8]> for Parameters<'a>
Source§impl<'a> PartialEq for Parameters<'a>
impl<'a> PartialEq for Parameters<'a>
Source§impl<'a> Serialize for Parameters<'a>
impl<'a> Serialize for Parameters<'a>
impl<'a> Eq for Parameters<'a>
impl<'a> StructuralPartialEq for Parameters<'a>
Auto Trait Implementations§
impl<'a> Freeze for Parameters<'a>
impl<'a> RefUnwindSafe for Parameters<'a>
impl<'a> Send for Parameters<'a>
impl<'a> Sync for Parameters<'a>
impl<'a> Unpin for Parameters<'a>
impl<'a> UnwindSafe for Parameters<'a>
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