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<AttributeValue> for AttributeValue
impl PartialEq<AttributeValue> 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.