Skip to main content

LocatorType

Enum LocatorType 

Source
pub enum LocatorType {
Show 37 variants Book, Chapter, Clause, Column, Corollary, Definition, Division, Figure, Folio, Line, Lemma, Note, Number, Opus, Page, Paragraph, Subparagraph, Subclause, Subdivision, Subsection, Part, Problem, Proposition, Recital, Schedule, Section, Surah, Theorem, SubVerbo, Supplement, Verse, Volume, VolumePeriodical, VolumeBook, Issue, Algorithm, Custom(String),
}
Expand description

Locator types for pinpoint citations.

Variants§

§

Book

Locator refers to a book within a larger work.

§

Chapter

Locator refers to a chapter.

§

Clause

Locator refers to a clause.

§

Column

Locator refers to a column.

§

Corollary

Locator refers to a corollary.

§

Definition

Locator refers to a definition.

§

Division

Locator refers to a division.

§

Figure

Locator refers to a figure.

§

Folio

Locator refers to a folio.

§

Line

Locator refers to a numbered line.

§

Lemma

Locator refers to a lemma.

§

Note

Locator refers to a note.

§

Number

Locator refers to a numbered unit.

§

Opus

Locator refers to an opus number.

§

Page

Locator refers to a page.

§

Paragraph

Locator refers to a paragraph.

§

Subparagraph

Locator refers to a sub-paragraph.

§

Subclause

Locator refers to a sub-clause.

§

Subdivision

Locator refers to a sub-division.

§

Subsection

Locator refers to a sub-section.

§

Part

Locator refers to a part or division.

§

Problem

Locator refers to a problem.

§

Proposition

Locator refers to a proposition.

§

Recital

Locator refers to a recital.

§

Schedule

Locator refers to a schedule.

§

Section

Locator refers to a section.

§

Surah

Locator refers to a surah.

§

Theorem

Locator refers to a theorem.

§

SubVerbo

Locator refers to an entry under a headword.

§

Supplement

Locator refers to a supplement.

§

Verse

Locator refers to a verse.

§

Volume

Locator refers to a volume.

§

VolumePeriodical

Locator refers to a periodical volume.

§

VolumeBook

Locator refers to a monograph volume.

§

Issue

Locator refers to an issue.

§

Algorithm

Locator refers to an algorithm.

§

Custom(String)

Locator refers to a custom pinpoint label.

Implementations§

Source§

impl LocatorType

Source

pub fn as_key(&self) -> Cow<'_, str>

Return the canonical kebab-case key for this locator label.

Source

pub fn from_key(value: &str) -> Result<LocatorType, String>

Parse a locator label from a known keyword or custom identifier.

§Errors

Returns an error when the input is empty or normalizes to an empty key.

Trait Implementations§

Source§

impl Clone for LocatorType

Source§

fn clone(&self) -> LocatorType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LocatorType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for LocatorType

Source§

fn default() -> LocatorType

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for LocatorType

Source§

fn deserialize<D>( deserializer: D, ) -> Result<LocatorType, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for LocatorType

Source§

impl Hash for LocatorType

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for LocatorType

Source§

fn eq(&self, other: &LocatorType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for LocatorType

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.