Struct concordium_std::AttributeValue
source · pub struct AttributeValue { /* private fields */ }
Expand description
An attribute value. The meaning of the bytes is dependent on the type of the attribute.
Implementations§
source§impl AttributeValue
impl AttributeValue
sourcepub fn new(data: &[u8]) -> Result<AttributeValue, NewAttributeValueError>
pub fn new(data: &[u8]) -> Result<AttributeValue, NewAttributeValueError>
Create a new Self
from a slice of bytes. The slice must have a
length of at most 31 bytes.
Trait Implementations§
source§impl AsRef<[u8]> for AttributeValue
impl AsRef<[u8]> for AttributeValue
source§impl Clone for AttributeValue
impl Clone for AttributeValue
source§fn clone(&self) -> AttributeValue
fn clone(&self) -> AttributeValue
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 AttributeValue
impl Debug for AttributeValue
source§impl Deserial for AttributeValue
impl Deserial for AttributeValue
source§fn deserial<R>(source: &mut R) -> Result<AttributeValue, ParseError>where
R: Read,
fn deserial<R>(source: &mut R) -> Result<AttributeValue, ParseError>where
R: Read,
Attempt to read a structure from a given source, failing if an error
occurs during deserialization or reading.
source§impl PartialEq for AttributeValue
impl PartialEq for AttributeValue
source§fn eq(&self, other: &AttributeValue) -> bool
fn eq(&self, other: &AttributeValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serial for AttributeValue
impl Serial for AttributeValue
source§impl TryFrom<&[u8]> for AttributeValue
impl TryFrom<&[u8]> for AttributeValue
§type Error = NewAttributeValueError
type Error = NewAttributeValueError
The type returned in the event of a conversion error.
source§fn try_from(
value: &[u8]
) -> Result<AttributeValue, <AttributeValue as TryFrom<&[u8]>>::Error>
fn try_from( value: &[u8] ) -> Result<AttributeValue, <AttributeValue as TryFrom<&[u8]>>::Error>
Performs the conversion.
impl Copy for AttributeValue
impl Eq for AttributeValue
impl StructuralPartialEq for AttributeValue
Auto Trait Implementations§
impl Freeze for AttributeValue
impl RefUnwindSafe for AttributeValue
impl Send for AttributeValue
impl Sync for AttributeValue
impl Unpin for AttributeValue
impl UnwindSafe for AttributeValue
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<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.