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>(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 const fn new_unchecked(bytes: Vec<u8>) -> OwnedParameter
pub const fn new_unchecked(bytes: Vec<u8>) -> 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 const fn empty() -> OwnedParameter
pub const 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
Display the entire parameter in hex.
impl Display for OwnedParameter
Display the entire parameter in hex.
Source§impl Hash for OwnedParameter
impl Hash for OwnedParameter
Source§impl PartialEq for OwnedParameter
impl PartialEq for OwnedParameter
Source§impl SchemaType for OwnedParameter
impl SchemaType for OwnedParameter
Source§impl Serial for OwnedParameter
impl Serial 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<D, S> DeserialWithState<S> for Dwhere
D: Deserial,
S: HasStateApi,
impl<D, S> DeserialWithState<S> for Dwhere
D: Deserial,
S: HasStateApi,
Source§fn deserial_with_state<R>(_state: &S, source: &mut R) -> Result<D, ParseError>where
R: Read,
fn deserial_with_state<R>(_state: &S, source: &mut R) -> Result<D, ParseError>where
R: Read,
Attempt to read a structure from a given source and state, failing if
an error occurs during deserialization or reading.