Enum hypothesis::annotations::Selector[][src]

pub enum Selector {
    TextQuoteSelector(TextQuoteSelector),
    RangeSelector(HashMap<String, Value>),
    TextPositionSelector(TextPositionSelector),
}

Many Annotations refer to part of a resource, rather than all of it, as the Target. We call that part of the resource a Segment (of Interest). A Selector is used to describe how to determine the Segment from within the Source resource. Web Annotation Data Model - Selectors

Variants

TextQuoteSelector(TextQuoteSelector)
RangeSelector(HashMap<String, Value>)

Selections made by users may be extensive and/or cross over internal boundaries in the representation, making it difficult to construct a single selector that robustly describes the correct content. A Range Selector can be used to identify the beginning and the end of the selection by using other Selectors. In this way, two points can be accurately identified using the most appropriate selection mechanisms, and then linked together to form the selection. The selection consists of everything from the beginning of the starting selector through to the beginning of the ending selector, but not including it. Web Annotation Data Model - Range Selector NOTE - the Hypothesis API doesn’t seem to follow this standard for RangeSelector so this just returns a HashMap for now TODO: make RangeSelector a struct

TextPositionSelector(TextPositionSelector)

Implementations

impl Selector[src]

pub fn new_quote(exact: &str, prefix: &str, suffix: &str) -> Self[src]

Trait Implementations

impl Clone for Selector[src]

impl Debug for Selector[src]

impl<'de> Deserialize<'de> for Selector[src]

impl PartialEq<Selector> for Selector[src]

impl Serialize for Selector[src]

impl StructuralPartialEq for Selector[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D> OwoColorize for D

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.