pub struct MetaData {
pub is_multi_part: Option<bool>,
pub content_type: Option<String>,
pub size: Option<u64>,
pub seq: Option<u64>,
pub file_name: Option<String>,
pub file_type: Option<String>,
pub md5: Option<String>,
pub description: Option<String>,
}Fields§
§is_multi_part: Option<bool>Bytes specific metadata
content_type: Option<String>General metadata
Content/Media type
size: Option<u64>File size, String size, Multi-part size, etc
seq: Option<u64>Sequence number for multi-part messages
file_name: Option<String>File metadata
File name
file_type: Option<String>File type (i.e. xml, json, txt, cpp, etc)
md5: Option<String>md5 of data
description: Option<String>Catchalls and future expansion
Could be anything such as json or xml of custom properties
Implementations§
Source§impl MetaData
impl MetaData
Sourcepub fn is_multi_part(&self) -> bool
pub fn is_multi_part(&self) -> bool
Returns the value of is_multi_part, or the default value if is_multi_part is unset.
Sourcepub fn content_type(&self) -> &str
pub fn content_type(&self) -> &str
Returns the value of content_type, or the default value if content_type is unset.
Sourcepub fn file_name(&self) -> &str
pub fn file_name(&self) -> &str
Returns the value of file_name, or the default value if file_name is unset.
Sourcepub fn file_type(&self) -> &str
pub fn file_type(&self) -> &str
Returns the value of file_type, or the default value if file_type is unset.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the value of description, or the default value if description is unset.
Trait Implementations§
Source§impl Message for MetaData
impl Message for MetaData
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for MetaData
Auto Trait Implementations§
impl Freeze for MetaData
impl RefUnwindSafe for MetaData
impl Send for MetaData
impl Sync for MetaData
impl Unpin for MetaData
impl UnwindSafe for MetaData
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