Skip to main content

Object

Trait Object 

Source
pub trait Object {
    // Provided methods
    fn stringify(&self) -> String { ... }
    fn isa_box(&self) -> bool { ... }
    fn is_expandable(&self) -> bool { ... }
    fn is_definition(&self) -> bool { ... }
    fn is_comment(&self) -> bool { ... }
    fn be_digested(self) -> Result<Digested>
       where Self: Sized + Debug { ... }
    fn get_locator(&self) -> Option<Locator> { ... }
    fn revert(&self) -> Result<Tokens> { ... }
}
Expand description

Base object for all LaTeXML Objects.

Defines basic default methods for comparison, printing

Provided Methods§

Source

fn stringify(&self) -> String

Source

fn isa_box(&self) -> bool

Source

fn is_expandable(&self) -> bool

Source

fn is_definition(&self) -> bool

Source

fn is_comment(&self) -> bool

Source

fn be_digested(self) -> Result<Digested>
where Self: Sized + Debug,

Source

fn get_locator(&self) -> Option<Locator>

The object’s stored source locator, if it has one. None is the honest “no recorded source position” (replacing the old Locator::default() file!()/line!() sentinel). For “where the parser is now” (error reporting, box creation), use the free fn gullet::get_locator().

Source

fn revert(&self) -> Result<Tokens>

each concrete object needs to provide its own path back to tokens

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§