Struct urls2disk::SimpleDocument
[−]
[src]
pub struct SimpleDocument { /* fields omitted */ }
SimpleDocument
is a model struct implementing the Document
trait.
Although you can certainly use this struct, you may want to consider writing
your own simple struct implementing Document
in order to provide more
customized behavior.
Methods
impl SimpleDocument
[src]
pub fn new(path: PathBuf, url: Url, wkhtmltopdf: bool) -> Self
[src]
Creates a new SimpleDocument
pub fn bytes(&self) -> Option<&[u8]>
[src]
If SimpleDocument
has already been downloaded by Client
, will
return Some(bytes)
; otherwise will return None
Trait Implementations
impl Clone for SimpleDocument
[src]
fn clone(&self) -> SimpleDocument
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for SimpleDocument
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Eq for SimpleDocument
[src]
impl Ord for SimpleDocument
[src]
fn cmp(&self, __arg_0: &SimpleDocument) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl PartialEq for SimpleDocument
[src]
fn eq(&self, __arg_0: &SimpleDocument) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SimpleDocument) -> bool
[src]
This method tests for !=
.
impl PartialOrd for SimpleDocument
[src]
fn partial_cmp(&self, __arg_0: &SimpleDocument) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &SimpleDocument) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &SimpleDocument) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &SimpleDocument) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &SimpleDocument) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Hash for SimpleDocument
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Document for SimpleDocument
[src]
fn path(&self) -> &Path
[src]
Returns a &Path
representing the location on disk to write the document to Read more
fn url(&self) -> &Url
[src]
Returns a &Url
representing the location of the document on the interwebs :) Read more
fn wkhtmltopdf(&self) -> bool
[src]
Returns a bool
representing whether or not the document should be converted to pdf using wkhtmltopdf
before being written to disk. true
means you would like the document to be converted using wkhtmltopdf
before being written to disk. false
means you would like to write raw bytes only. Read more
fn set_bytes(&mut self, bytes: Option<Vec<u8>>)
[src]
Enables setting raw bytes of the object after they have been downloaded.