pub struct ORCID {
    pub schema_uri: Option<String>,
    pub identifier: Option<String>,
    pub check_digit: Option<String>,
}Expand description
Open Researcher and Contributor ID (ORCiD)1
Disambiguates researchers, and connects people with their research activities. This includes employment affiliations, research outputs, funding, peer review activity, research resources, society membership, distinctions and other scholarly infrastructure.
See https://orcid.org/ for more information
L. L. Haak, M. Fenner, L. Paglione, E. Pentz, and H. Ratner, "ORCID: a system to uniquely identify researchers," Learned Publishing, vol. 25, no. 4, pp. 259-264, 2012, doi: 10.1087/20120404.↩
Fields§
§schema_uri: Option<String>Schema URI (i.e., https://orcid.org/)
identifier: Option<String>16 digit string with hyphens every 4 digits (for readability)
ORCID::identifier method to access ORCiD identifier.check_digit: Option<String>The check digit is the last (16th) digit of the identifier
§Note
Check digit should be verified IAW by ISO 7064, MOD 11-2 (see iso7064_check_digit)
Implementations§
Source§impl ORCID
 
impl ORCID
Sourcepub fn init() -> ORCIDBuilder
 
pub fn init() -> ORCIDBuilder
Create an instance of ORCID using the builder syntax
Source§impl ORCID
 
impl ORCID
Sourcepub fn format<S>(value: S) -> String
 
pub fn format<S>(value: S) -> String
Convenience method for easily parsing and formatting a ORCID from a string value
§Example
use acorn_lib::schema::pid::ORCID;
assert_eq!(ORCID::format("https://orcid.org/0000-0002-2057-9115"), "https://orcid.org/0000-0002-2057-9115");
assert_eq!(ORCID::format("0000-0002-2057-9115"), "https://orcid.org/0000-0002-2057-9115");Sourcepub fn from_string<S>(value: S) -> ORCID
 
pub fn from_string<S>(value: S) -> ORCID
Create new ORCID by parsing raw string value
§Example
use acorn_lib::schema::pid::ORCID;
let orcid = ORCID::from_string("https://orcid.org/0000-0002-2057-9115");
assert_eq!(orcid.identifier(), "0000-0002-2057-9115");Sourcepub fn is_valid<S>(value: S) -> bool
 
pub fn is_valid<S>(value: S) -> bool
Check if value is a valid ORCiD
§Conditions
- ORCiD identifier must be 16 characters, 0 thru 9, or “X”
 - Last character of identifier must be a valid ISO 7064 check digit (see 
iso7064_check_digit) - Value can be valid with or without hyphens in the ORCiD identifier1
 - Value can be valid with or without schema URI1
 
§Example
use acorn_lib::schema::pid::ORCID;
assert!(ORCID::is_valid("https://orcid.org/0000-0002-2057-9115"));
assert!(ORCID::is_valid("0000-0002-2057-9115"));
assert!(ORCID::is_valid("0000000220579115"));Trait Implementations§
Source§impl PersistentIdentifier for ORCID
 
impl PersistentIdentifier for ORCID
Source§fn schema_uri(&self) -> String
 
fn schema_uri(&self) -> String
Source§fn identifier(&self) -> String
 
fn identifier(&self) -> String
Get ORCID identifier
§Notes
- Will return an empty string if no identifier is present
 - Will always return a 19 character string with a hyphen every 4 characters (i.e., “0000-0000-0000-0000”)
 
Source§fn suffix(&self) -> Option<String>
 
fn suffix(&self) -> Option<String>
Source§fn check_digit(&self) -> Option<char>
 
fn check_digit(&self) -> Option<char>
Auto Trait Implementations§
impl Freeze for ORCID
impl RefUnwindSafe for ORCID
impl Send for ORCID
impl Sync for ORCID
impl Unpin for ORCID
impl UnwindSafe for ORCID
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
 
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Key for Twhere
    T: Clone,
 
impl<T> Key for Twhere
    T: Clone,
§impl<D> OwoColorize for D
 
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
    C: Color,
 
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
    C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
    C: Color,
 
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
    C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
 
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
 
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
 
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
 
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
 
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
 
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
 
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
 
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
 
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
 
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
 
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
 
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
 
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
 
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
 
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
 
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
 
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
 
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
 
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
 
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
 
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
 
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
 
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
 
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
 
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
    &self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
 
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
    &self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
 
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
 
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
 
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§impl<T> Pointable for T
 
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
    T: ?Sized,
 
impl<T> PolicyExt for Twhere
    T: ?Sized,
Source§impl<T> SectionExt for T
 
impl<T> SectionExt for T
§impl<T> ToCompactString for Twhere
    T: Display,
 
impl<T> ToCompactString for Twhere
    T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
 
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
 
fn to_compact_string(&self) -> CompactString
CompactString]. Read more§impl<T> ToStringFallible for Twhere
    T: Display,
 
impl<T> ToStringFallible for Twhere
    T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
 
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.