Lexplore

Struct Lexplore 

Source
pub struct Lexplore;
Expand description

Interface for loading per-element test sources

Implementations§

Source§

impl Lexplore

Source

pub fn load(element_type: ElementType, number: usize) -> DocumentLoader

Load an element file by type and number

Returns a DocumentLoader which provides transform shortcuts.

Source

pub fn load_document(doc_type: DocumentType, number: usize) -> DocumentLoader

Load a document collection file by type and number

Returns a DocumentLoader which provides transform shortcuts.

Source

pub fn from_path<P: AsRef<Path>>(path: P) -> DocumentLoader

Load from an arbitrary file path

Returns a DocumentLoader which provides transform shortcuts.

Source

pub fn get_paragraph(number: usize) -> &'static Paragraph

Load a paragraph element file and return the paragraph directly

§Example
let paragraph = Lexplore::get_paragraph(3);
assert!(paragraph.text().starts_with("Expected"));
Source

pub fn get_list(number: usize) -> &'static List

Load a list element file and return the list directly

Source

pub fn get_session(number: usize) -> &'static Session

Load a session element file and return the session directly

Source

pub fn get_definition(number: usize) -> &'static Definition

Load a definition element file and return the definition directly

Source

pub fn get_annotation(number: usize) -> &'static Annotation

Load an annotation element file and return the annotation directly

Source

pub fn get_verbatim(number: usize) -> &'static Verbatim

Load a verbatim element file and return the verbatim block directly

Source

pub fn paragraph(number: usize) -> DocumentLoader

Load a paragraph file (returns DocumentLoader for transforms)

Source

pub fn list(number: usize) -> DocumentLoader

Load a list file (returns DocumentLoader for transforms)

Source

pub fn session(number: usize) -> DocumentLoader

Load a session file (returns DocumentLoader for transforms)

Source

pub fn definition(number: usize) -> DocumentLoader

Load a definition file (returns DocumentLoader for transforms)

Source

pub fn annotation(number: usize) -> DocumentLoader

Load a annotation file (returns DocumentLoader for transforms)

Source

pub fn verbatim(number: usize) -> DocumentLoader

Load a verbatim file (returns DocumentLoader for transforms)

Source

pub fn document(number: usize) -> DocumentLoader

Load a document file (returns DocumentLoader for transforms)

Source

pub fn benchmark(number: usize) -> DocumentLoader

Load a benchmark document (returns DocumentLoader for transforms)

Source

pub fn trifecta(number: usize) -> DocumentLoader

Load a trifecta document (returns DocumentLoader for transforms)

Source

pub fn list_numbers_for( element_type: ElementType, ) -> Result<Vec<usize>, ElementSourceError>

List all available numbers for a given element type

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more