Enum chill::Attachment
[−]
[src]
pub enum Attachment { // some variants omitted }
Contains the meta-information and, optionally, content of an attachment.
Methods
impl Attachment
[src]
fn content_type(&self) -> &Mime
Returns the attachment's content type.
fn content_length(&self) -> u64
Returns the attachment's content size, in bytes.
fn content(&self) -> Option<&Vec<u8>>
Returns the attachment's content, if available.
An attachment's content is available if and only if the attachment is
not a stub. By default, the CouchDB server sends attachment stubs as
part of a document when the client reads the document. The client may
explicitly request the attachment content when reading the document to
receive a full attachment, in which case this method will return Some
instead of None
. Also, if the client inserted the attachment via the
Document::insert_attachment
method, then the attachment contains
content and this method will return Some
.
Trait Implementations
impl PartialEq for Attachment
[src]
fn eq(&self, __arg_0: &Attachment) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Attachment) -> bool
This method tests for !=
.
impl Debug for Attachment
[src]
impl Clone for Attachment
[src]
fn clone(&self) -> Attachment
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more