pub struct BinaryBody {
pub field: Option<String>,
pub content_type_field: Option<String>,
pub content_type_accepts: Option<String>,
}
Fields§
§field: Option<String>
§content_type_field: Option<String>
Specify the field to take the content-type from.
content_type_accepts: Option<String>
This field is purely used by the openapi spec to denote the set of valid output formats.
Implementations§
Source§impl BinaryBody
impl BinaryBody
Sourcepub fn field(&self) -> &str
pub fn field(&self) -> &str
Returns the value of field
, or the default value if field
is unset.
Sourcepub fn content_type_field(&self) -> &str
pub fn content_type_field(&self) -> &str
Returns the value of content_type_field
, or the default value if content_type_field
is unset.
Sourcepub fn content_type_accepts(&self) -> &str
pub fn content_type_accepts(&self) -> &str
Returns the value of content_type_accepts
, or the default value if content_type_accepts
is unset.
Trait Implementations§
Source§impl Clone for BinaryBody
impl Clone for BinaryBody
Source§fn clone(&self) -> BinaryBody
fn clone(&self) -> BinaryBody
Returns a copy 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 BinaryBody
impl Debug for BinaryBody
Source§impl Default for BinaryBody
impl Default for BinaryBody
Source§impl Message for BinaryBody
impl Message for BinaryBody
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
.Source§impl PartialEq for BinaryBody
impl PartialEq for BinaryBody
impl StructuralPartialEq for BinaryBody
Auto Trait Implementations§
impl Freeze for BinaryBody
impl RefUnwindSafe for BinaryBody
impl Send for BinaryBody
impl Sync for BinaryBody
impl Unpin for BinaryBody
impl UnwindSafe for BinaryBody
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