pub struct SmolBlob { /* private fields */ }
Implementations§
Source§impl SmolBlob
SmolBlob
is a chunk of smol data
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();
Trait Implementations§
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