Enum url_crawler::CrawlerSource [−][src]
Defines whether to crawl from a single source, or from multiple sources.
Both the From<String>
and From<Vec<String>>
traits are implemented for this.
use url_crawler::CrawlerSource; let single: String = "url".into(); let multiple: Vec<String> = vec![ "url1".into(), "url2".into() ]; // Get a source from a `String`. let source: CrawlerSource = single.into(); assert_eq!(CrawlerSource::Single("url".into()), source); // Get a source from a `Vec<String>`. let source: CrawlerSource = multiple.into(); assert_eq!( CrawlerSource::Multiple(vec!["url1".into(), "url2".into()]), source );
Variants
Single(String)
Multiple(Vec<String>)
Trait Implementations
impl Debug for CrawlerSource
[src]
impl Debug for CrawlerSource
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for CrawlerSource
[src]
impl Clone for CrawlerSource
fn clone(&self) -> CrawlerSource
[src]
fn clone(&self) -> CrawlerSource
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for CrawlerSource
[src]
impl PartialEq for CrawlerSource
fn eq(&self, other: &CrawlerSource) -> bool
[src]
fn eq(&self, other: &CrawlerSource) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &CrawlerSource) -> bool
[src]
fn ne(&self, other: &CrawlerSource) -> bool
This method tests for !=
.
impl From<String> for CrawlerSource
[src]
impl From<String> for CrawlerSource
impl From<Vec<String>> for CrawlerSource
[src]
impl From<Vec<String>> for CrawlerSource
Auto Trait Implementations
impl Send for CrawlerSource
impl Send for CrawlerSource
impl Sync for CrawlerSource
impl Sync for CrawlerSource