pub struct EncodedBinary {
pub data: String,
pub encoding: BinaryEncoding,
}Expand description
A blob paired with the encoding needed to decode it.
Fields§
§data: StringEncoded payload.
encoding: BinaryEncodingEncoding scheme used for the payload.
Implementations§
Source§impl EncodedBinary
impl EncodedBinary
pub fn new(data: String, encoding: BinaryEncoding) -> Self
pub fn from_bytes(bytes: &[u8], encoding: BinaryEncoding) -> Self
pub fn decode(&self) -> Result<Vec<u8>, Base64DecodeError>
Trait Implementations§
Source§impl Clone for EncodedBinary
impl Clone for EncodedBinary
Source§fn clone(&self) -> EncodedBinary
fn clone(&self) -> EncodedBinary
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncodedBinary
impl Debug for EncodedBinary
Source§impl<'de> Deserialize<'de> for EncodedBinary
impl<'de> Deserialize<'de> for EncodedBinary
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 EncodedBinary
impl RefUnwindSafe for EncodedBinary
impl Send for EncodedBinary
impl Sync for EncodedBinary
impl Unpin for EncodedBinary
impl UnsafeUnpin for EncodedBinary
impl UnwindSafe for EncodedBinary
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