pub struct SmolBlob { /* private fields */ }
Implementations§
source§impl SmolBlob
impl SmolBlob
SmolBlob
is a chunk of smol data
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
returns the inner buffer length ONLY, not to be confused by SmolBlob::buffer
.len()
sourcepub fn decode(input: &Vec<u8>) -> Result<String, Error>
pub fn decode(input: &Vec<u8>) -> Result<String, Error>
decodes a SmolBlob::buffer
and returns a String
§example
let decoded: String = SmolBlob::decode(&encoded.buffer()).unwrap();
fs::write("unsmol.bin", &decoded).unwrap();
Auto Trait Implementations§
impl Freeze for SmolBlob
impl RefUnwindSafe for SmolBlob
impl Send for SmolBlob
impl Sync for SmolBlob
impl Unpin for SmolBlob
impl UnwindSafe for SmolBlob
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