pub struct BinaryContent {
pub data: Vec<u8>,
pub media_type: String,
}Expand description
Binary content container for file data.
Encapsulates raw binary data along with its MIME type for type-safe handling of file content like images, audio, or documents.
Fields§
§data: Vec<u8>The raw binary data.
media_type: StringThe MIME type of the content (e.g., “image/png”, “audio/wav”).
Implementations§
Trait Implementations§
Source§impl Clone for BinaryContent
impl Clone for BinaryContent
Source§fn clone(&self) -> BinaryContent
fn clone(&self) -> BinaryContent
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 BinaryContent
impl Debug for BinaryContent
Source§impl Default for BinaryContent
impl Default for BinaryContent
Source§fn default() -> BinaryContent
fn default() -> BinaryContent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BinaryContent
impl<'de> Deserialize<'de> for BinaryContent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BinaryContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BinaryContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BinaryContent
impl PartialEq for BinaryContent
Source§impl Serialize for BinaryContent
impl Serialize for BinaryContent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for BinaryContent
Auto Trait Implementations§
impl Freeze for BinaryContent
impl RefUnwindSafe for BinaryContent
impl Send for BinaryContent
impl Sync for BinaryContent
impl Unpin for BinaryContent
impl UnwindSafe for BinaryContent
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