pub struct ARK {
    pub assigned_name: Option<String>,
    pub label: String,
    pub name_assigning_authority_number: Option<String>,
    pub name_mapping_authority: Option<String>,
    pub parts: Vec<String>,
    pub variants: Vec<String>,
}Expand description
Archival Resource Key (ARK)
§Notes
- ARKs are the only mainstream, non-siloed, non-paywalled identifiers that you can register to use in about 48 hours
 - ARKs are decentralized
 - There are no fees for ARKs, PURLs, and URNs
 - ARKs give access to almost any kind of thing, whether digital, physical, abstract, person, group, etc.
 - ARKs can be deleted
 - ARKs support early object development
 - ARKs that differ only by hyphens are considered identical
 
See the ARK specification and https://wiki.lyrasis.org/display/ARKs/ARK+Identifiers+FAQ for more information
Fields§
§assigned_name: Option<String>The part of the ARK string that your organization is responsible for making unique.
The first 2 or more characters constitue the shoulder of the ARK which must meet the following criteria:
- Must start with one or more lowercase letters
 - Must end with a digit (non-zero preferred)
 - Must not contain vowels or the letter “l” (ell)
 - Must not contain any 
/characters (being opaque is part of the shoulder design) 
label: StringPrefix for NAAN (e.g., “ark:” or the older, “ark:/”)
Number (here represented as a string) identifying an organization that creates or assigns identifiers
§Notes
- Since 2001, every assigned name assigning authority number (NAAN) has consisted of exactly five digits, specifically five beta-numeric digits
 - Any given identifier will have exactly one NAAN but may have more than one NMA (at a time or over time)
 - Similar to registration authority or prefix for 
DOIs, naming authority for Handles, and namespace identifier for URNs 
String identifying a service that accepts names and returns information about them
§Notes
Any given identifier will have exactly one NAAN but may have more than one NMA (at a time or over time)
parts: Vec<String>First section of optional “qualifier” part of ARK
Generally serve as sub-namespaces to enabling grouping ARKs
variants: Vec<String>Last section of optional “qualifier” part of ARK
Typically is used to identify a specific version of a resource (i.e., “pdf”, “fr”, “v3”, etc.)
Implementations§
Source§impl ARK
 
impl ARK
Sourcepub fn format<S>(value: S) -> String
 
pub fn format<S>(value: S) -> String
Convenience method for easily parsing and formatting an ARK from a string value
§Example
use acorn_lib::schema::pid::ARK;
assert_eq!(ARK::format("ark:/1234/5678"), "ark:/1234/5678");
assert_eq!(ARK::format("https://n2t.net/ark:12148/btv1b8449691v/f29"), "ark:12148/btv1b8449691v/f29");Sourcepub fn from_string<S>(value: S) -> ARK
 
pub fn from_string<S>(value: S) -> ARK
Create new ARK by parsing raw string value
§Example
use acorn_lib::schema::pid::ARK;
let doi = ARK::from_string("");
Sourcepub fn is_valid<S>(value: S) -> bool
 
pub fn is_valid<S>(value: S) -> bool
Check if value is a valid ARK
§Conditions
- ARKs are preferred to be “actionable” with the inclusion of a NMA URL, but are not required to be so (NMA is optional)
 - If ARK is to contain a URL, “https” is the only allowed scheme
 - Should have only one instance of “ark:” label
 - NAAN should be an integer
 - Assigned name should start with a valid shoulder
 - Last character should be valid check digit (see 
noid_check_digit) 
§Example
use acorn_lib::schema::pid::ARK;
assert!(ARK::is_valid("https://n2t.net/ark:99166/w66d60p2"));
assert!(ARK::is_valid("https://n2t.net/ark:12148/btv1b8449691v/f29"));Trait Implementations§
Source§impl PersistentIdentifier for ARK
 
impl PersistentIdentifier for ARK
Source§fn suffix(&self) -> Option<String>
 
fn suffix(&self) -> Option<String>
Returns consistent string representation of ARK qualifiers which often name subobjects of a persistent object that are less stable and less opaquely named than the parent object
Source§fn schema_uri(&self) -> String
 
fn schema_uri(&self) -> String
Source§fn identifier(&self) -> String
 
fn identifier(&self) -> String
Source§fn prefix(&self) -> Option<String>
 
fn prefix(&self) -> Option<String>
Source§fn check_digit(&self) -> Option<char>
 
fn check_digit(&self) -> Option<char>
Auto Trait Implementations§
impl Freeze for ARK
impl RefUnwindSafe for ARK
impl Send for ARK
impl Sync for ARK
impl Unpin for ARK
impl UnwindSafe for ARK
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.