Enum inspirer::Sources
[−]
[src]
pub enum Sources<'a> { Inspire(RecID<'a>), Ads(BibCode<'a>), Arxiv, None, }
Variants
Inspire(RecID<'a>)
Ads(BibCode<'a>)
Arxiv
None
Trait Implementations
impl<'a> Debug for Sources<'a>
[src]
impl<'a> PartialEq for Sources<'a>
[src]
fn eq(&self, __arg_0: &Sources<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Sources<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> From<&'a str> for Sources<'a>
[src]
Guess a likely source for a BibTeX key
Returns Sources::None
if unable to make a good guess.
Examples
extern crate inspirer; extern crate libinspire; let inspirer = inspirer::Inspirer::init(None); assert_eq!( inspirer::Sources::from("Randall:1999ee"), inspirer::Sources::Inspire(libinspire::RecID::new("Randall:1999ee").unwrap()) );
extern crate inspirer; extern crate libads; let inspirer = inspirer::Inspirer::init(None); assert_eq!( inspirer::Sources::from("1999PhRvL..83.3370R"), inspirer::Sources::Ads(libads::BibCode::new("1999PhRvL..83.3370R").unwrap()) );