Struct concordium_std::OwnedParameter
source · pub struct OwnedParameter(_);
Expand description
Parameter to the init function or entrypoint. Owned version.
Implementations§
source§impl OwnedParameter
impl OwnedParameter
sourcepub fn as_parameter(&self) -> Parameter<'_>
pub fn as_parameter(&self) -> Parameter<'_>
sourcepub fn from_serial<D>(data: &D) -> Result<OwnedParameter, ExceedsParameterSize>where
D: Serial,
pub fn from_serial<D>(data: &D) -> Result<OwnedParameter, ExceedsParameterSize>where D: Serial,
Construct an Self
by serializing the input using its
Serial` instance.
Returns an error if the serialized parameter exceeds
MAX_PARAMETER_LEN
.
sourcepub fn new_unchecked(bytes: Vec<u8, Global>) -> OwnedParameter
pub fn new_unchecked(bytes: Vec<u8, Global>) -> OwnedParameter
Construct a parameter from a vector of bytes without checking that it fits the size limit. The caller is assumed to ensure this via external means.
sourcepub fn empty() -> OwnedParameter
pub fn empty() -> OwnedParameter
Construct an empty parameter.
Trait Implementations§
source§impl AsRef<[u8]> for OwnedParameter
impl AsRef<[u8]> for OwnedParameter
source§impl Clone for OwnedParameter
impl Clone for OwnedParameter
source§fn clone(&self) -> OwnedParameter
fn clone(&self) -> OwnedParameter
Returns a copy 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 Debug for OwnedParameter
impl Debug for OwnedParameter
source§impl Default for OwnedParameter
impl Default for OwnedParameter
source§fn default() -> OwnedParameter
fn default() -> OwnedParameter
Returns the “default value” for a type. Read more
source§impl Deserial for OwnedParameter
impl Deserial for OwnedParameter
source§fn deserial<R>(source: &mut R) -> Result<OwnedParameter, ParseError>where
R: Read,
fn deserial<R>(source: &mut R) -> Result<OwnedParameter, ParseError>where R: Read,
Attempt to read a structure from a given source, failing if an error
occurs during deserialization or reading.
source§impl Display for OwnedParameter
impl Display for OwnedParameter
Display the entire parameter in hex.
source§impl Hash for OwnedParameter
impl Hash for OwnedParameter
source§impl PartialEq<OwnedParameter> for OwnedParameter
impl PartialEq<OwnedParameter> for OwnedParameter
source§fn eq(&self, other: &OwnedParameter) -> bool
fn eq(&self, other: &OwnedParameter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.