pub struct Blob(/* private fields */);Expand description
Engine-neutral binary scalar.
Implementations§
Source§impl Blob
impl Blob
Sourcepub fn from_hex_literal(text: &str) -> Result<Self, SchemaContractError>
pub fn from_hex_literal(text: &str) -> Result<Self, SchemaContractError>
Parse an unprefixed, even-length ASCII hex schema literal.
Empty input represents empty bytes. This authoring boundary caps decoded
bytes at crate::MAX_PROPOSAL_LITERAL_BYTES; runtime Blob values retain
their independent size admission.
§Errors
Returns crate::SchemaContractError::InvalidLiteral for malformed hex
or oversized input, before allocating the decoded buffer.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Consume the atom and return its bytes.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Blob
impl<'de> Deserialize<'de> for Blob
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
impl Eq for Blob
Source§impl Ord for Blob
impl Ord for Blob
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Blob
impl PartialOrd for Blob
impl StructuralPartialEq for Blob
Auto Trait Implementations§
impl Freeze for Blob
impl RefUnwindSafe for Blob
impl Send for Blob
impl Sync for Blob
impl Unpin for Blob
impl UnsafeUnpin for Blob
impl UnwindSafe for Blob
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