pub struct ContentDisposition;
Expand description
Defines the disposition of a multipart part it is used on (rfc2183)
This is meant to be used as a header for a multipart body part, which was created from a resource, mainly a file.
Examples are attachments like images, etc.
Possible Dispositions are:
- Inline
- Attachment
Additional it is used to provide following information as parameters:
filename
: the file name associated with the resource this body is based oncreation-date
: when the resource this body is based on was createdmodification-date
: when the resource this body is based on was last modifiedread-date
: when the resource this body is based on was read (to create the body)size
: the size this resource should have, note thatContent-Size
is NOT a mail related header but specific to http.
Trait Implementations§
Source§impl Clone for ContentDisposition
impl Clone for ContentDisposition
Source§fn clone(&self) -> ContentDisposition
fn clone(&self) -> ContentDisposition
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 Default for ContentDisposition
impl Default for ContentDisposition
Source§fn default() -> ContentDisposition
fn default() -> ContentDisposition
Returns the “default value” for a type. Read more
Source§impl HeaderKind for ContentDisposition
impl HeaderKind for ContentDisposition
Source§const MAX_ONE: bool = true
const MAX_ONE: bool = true
I true this will assure that the header is at most one time in a header map. Read more
Source§const VALIDATOR: Option<HeaderMapValidator> = { None }
const VALIDATOR: Option<HeaderMapValidator> = { None }
A function which is meant to be called with a reference
to the final header map before encoding the headers. It is
meant to be used do some of the contextual validations,
like e.g. a
From
header might return a function which
checks if the From
header has multiple mailboxes and
if so checks if there is a Sender
header Read moreSource§type Component = Disposition
type Component = Disposition
the component representing the header-field, e.g.
Unstructured
for Subject
Source§fn name() -> HeaderName
fn name() -> HeaderName
a method returning the header name Read more
Source§fn auto_body<H>(body: H) -> Result<Header<Self>, ComponentCreationError>where
H: HeaderTryInto<Self::Component>,
fn auto_body<H>(body: H) -> Result<Header<Self>, ComponentCreationError>where
H: HeaderTryInto<Self::Component>,
Creates a
Header
instance automatically converting given body to the right type. Read moreimpl Copy for ContentDisposition
impl MaxOneMarker for ContentDisposition
Auto Trait Implementations§
impl Freeze for ContentDisposition
impl RefUnwindSafe for ContentDisposition
impl Send for ContentDisposition
impl Sync for ContentDisposition
impl Unpin for ContentDisposition
impl UnwindSafe for ContentDisposition
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