pub struct Blob(pub Bytes);
Expand description
An in-memory representation of an Ion blob.
use ion_rs::element::Blob;
let ivm: &[u8] = &[0xEA_u8, 0x01, 0x00, 0xE0]; // Ion 1.0 version marker
let blob: Blob = ivm.into();
assert_eq!(&blob, ivm);
assert_eq!(blob.as_slice().len(), 4);
use ion_rs::element::Blob;
let blob: Blob = "hello".into();
assert_eq!(&blob, "hello".as_bytes());
assert_eq!(blob.as_slice().len(), 5);
Tuple Fields§
§0: Bytes
Implementations§
Trait Implementations§
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<V> IntoAnnotatedElement for V
impl<V> IntoAnnotatedElement for V
Source§fn with_annotations<I: IntoAnnotations>(self, annotations: I) -> Element
fn with_annotations<I: IntoAnnotations>(self, annotations: I) -> Element
Converts the value into an Element with the specified annotations.