pub struct OwnedParameter(/* private fields */);
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: Serial>(data: &D) -> Result<Self, ExceedsParameterSize>
pub fn from_serial<D: Serial>(data: &D) -> Result<Self, ExceedsParameterSize>
Construct an Self
by serializing the input using its
Serial` instance.
Returns an error if the serialized parameter exceeds
MAX_PARAMETER_LEN
.
sourcepub const fn new_unchecked(bytes: Vec<u8>) -> Self
pub const fn new_unchecked(bytes: Vec<u8>) -> Self
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.
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§impl<'de> Deserialize<'de> for OwnedParameter
impl<'de> Deserialize<'de> for OwnedParameter
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 Display for OwnedParameter
impl Display for OwnedParameter
Display the entire parameter in hex.
source§impl From<OwnedParameter> for Vec<u8>
impl From<OwnedParameter> for Vec<u8>
source§fn from(op: OwnedParameter) -> Self
fn from(op: OwnedParameter) -> Self
Converts to this type from the input type.
source§impl Hash for OwnedParameter
impl Hash for OwnedParameter
source§impl PartialEq for OwnedParameter
impl PartialEq 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 ==
.source§impl SchemaType for OwnedParameter
impl SchemaType for OwnedParameter
source§impl Serial for OwnedParameter
impl Serial for OwnedParameter
source§impl Serialize for OwnedParameter
impl Serialize for OwnedParameter
impl Eq for OwnedParameter
impl StructuralPartialEq for OwnedParameter
Auto Trait Implementations§
impl Freeze for OwnedParameter
impl RefUnwindSafe for OwnedParameter
impl Send for OwnedParameter
impl Sync for OwnedParameter
impl Unpin for OwnedParameter
impl UnwindSafe for OwnedParameter
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
source§impl<T> ToHex for T
impl<T> ToHex for T
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)