pub struct YBytes(/* private fields */);
Implementations§
Source§impl YBytes
impl YBytes
pub fn new(data: Vec<u8>) -> YBytes
pub fn data(&self) -> &Vec<u8>
pub fn into_vec(self) -> Vec<u8>
pub fn length(&self) -> usize
pub fn md5(&self) -> String
pub fn to_str(&self) -> YRes<String>
pub fn base64(&self) -> String
pub fn from_base64(base64_str: &str) -> YRes<YBytes>
pub fn open_file(file_path: &str) -> YRes<YBytes>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for YBytes
impl<'de> Deserialize<'de> for YBytes
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
Auto Trait Implementations§
impl Freeze for YBytes
impl RefUnwindSafe for YBytes
impl Send for YBytes
impl Sync for YBytes
impl Unpin for YBytes
impl UnwindSafe for YBytes
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<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more