pub struct BinaryData(pub Vec<u8>);Tuple Fields§
§0: Vec<u8>Implementations§
Source§impl BinaryData
impl BinaryData
pub fn new(buffer: Vec<u8>) -> BinaryData
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn to_vec(&self) -> Vec<u8> ⓘ
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn from_string( encoded_value: &str, encoding: Encoding, ) -> Result<BinaryData, Error>
pub fn from_string_with_encoding_string( encoded_value: &str, encoding_string: Option<&str>, ) -> Result<BinaryData, Error>
pub fn to_string(&self, encoding: Encoding) -> String
pub fn to_string_with_encoding_string( &self, encoding_string: Option<&str>, ) -> String
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for BinaryData
impl<'__de, __Context> BorrowDecode<'__de, __Context> for BinaryData
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for BinaryData
impl Clone for BinaryData
Source§fn clone(&self) -> BinaryData
fn clone(&self) -> BinaryData
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 BinaryData
impl Debug for BinaryData
Source§impl<__Context> Decode<__Context> for BinaryData
impl<__Context> Decode<__Context> for BinaryData
Source§impl Default for BinaryData
impl Default for BinaryData
Source§fn default() -> BinaryData
fn default() -> BinaryData
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BinaryData
impl<'de> Deserialize<'de> for BinaryData
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
Source§impl Encode for BinaryData
impl Encode for BinaryData
Source§impl From<&BinaryData> for String
impl From<&BinaryData> for String
Source§fn from(val: &BinaryData) -> Self
fn from(val: &BinaryData) -> Self
Converts to this type from the input type.
Source§impl From<&BinaryData> for Value
impl From<&BinaryData> for Value
Source§fn from(value: &BinaryData) -> Self
fn from(value: &BinaryData) -> Self
Converts to this type from the input type.
Source§impl From<BinaryData> for String
impl From<BinaryData> for String
Source§fn from(val: BinaryData) -> Self
fn from(val: BinaryData) -> Self
Converts to this type from the input type.
Source§impl From<BinaryData> for Value
impl From<BinaryData> for Value
Source§fn from(value: BinaryData) -> Self
fn from(value: BinaryData) -> Self
Converts to this type from the input type.
Source§impl Hash for BinaryData
impl Hash for BinaryData
Source§impl Ord for BinaryData
impl Ord for BinaryData
Source§fn cmp(&self, other: &BinaryData) -> Ordering
fn cmp(&self, other: &BinaryData) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<&[u8]> for BinaryData
impl PartialEq<&[u8]> for BinaryData
Source§impl PartialEq<[u8]> for BinaryData
impl PartialEq<[u8]> for BinaryData
Source§impl PartialEq for BinaryData
impl PartialEq for BinaryData
Source§impl PartialOrd for BinaryData
impl PartialOrd for BinaryData
Source§impl Serialize for BinaryData
impl Serialize for BinaryData
Source§impl TryFrom<&Value> for BinaryData
impl TryFrom<&Value> for BinaryData
Source§impl TryFrom<String> for BinaryData
impl TryFrom<String> for BinaryData
Source§impl TryFrom<Value> for BinaryData
impl TryFrom<Value> for BinaryData
impl Eq for BinaryData
impl StructuralPartialEq for BinaryData
Auto Trait Implementations§
impl Freeze for BinaryData
impl RefUnwindSafe for BinaryData
impl Send for BinaryData
impl Sync for BinaryData
impl Unpin for BinaryData
impl UnwindSafe for BinaryData
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<'de, T> DefaultBorrowDecode<'de> for Twhere
T: BorrowDecode<'de, ()>,
impl<'de, T> DefaultBorrowDecode<'de> for Twhere
T: BorrowDecode<'de, ()>,
fn borrow_decode<D>(decoder: &mut D) -> Result<Self, DecodeError>
§impl<T> DefaultDecode for T
impl<T> DefaultDecode for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T, U> IntoPlatformVersioned<U> for Twhere
U: FromPlatformVersioned<T>,
impl<T, U> IntoPlatformVersioned<U> for Twhere
U: FromPlatformVersioned<T>,
§fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U
fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U
Performs the conversion.
§impl<T, U> TryIntoPlatformVersioned<U> for Twhere
U: TryFromPlatformVersioned<T>,
impl<T, U> TryIntoPlatformVersioned<U> for Twhere
U: TryFromPlatformVersioned<T>,
§type Error = <U as TryFromPlatformVersioned<T>>::Error
type Error = <U as TryFromPlatformVersioned<T>>::Error
The type returned in the event of a conversion error.
§fn try_into_platform_versioned(
self,
platform_version: &PlatformVersion,
) -> Result<U, <U as TryFromPlatformVersioned<T>>::Error>
fn try_into_platform_versioned( self, platform_version: &PlatformVersion, ) -> Result<U, <U as TryFromPlatformVersioned<T>>::Error>
Performs the conversion.
§impl<T, U> TryIntoVersioned<U> for Twhere
U: TryFromVersioned<T>,
impl<T, U> TryIntoVersioned<U> for Twhere
U: TryFromVersioned<T>,
§type Error = <U as TryFromVersioned<T>>::Error
type Error = <U as TryFromVersioned<T>>::Error
The type returned in the event of a conversion error.
§fn try_into_versioned(
self,
grove_version: &GroveVersion,
) -> Result<U, <U as TryFromVersioned<T>>::Error>
fn try_into_versioned( self, grove_version: &GroveVersion, ) -> Result<U, <U as TryFromVersioned<T>>::Error>
Performs the conversion.