Enum STeXAnnot

Source
pub enum STeXAnnot {
Show 34 variants Module { uri: ModuleURI, name_range: SourceRange<LSPLineCol>, opts: Vec<SModuleArg<LSPLineCol, Self>>, sig: Option<Language>, meta_theory: Option<ModuleReference>, full_range: SourceRange<LSPLineCol>, smodule_range: SourceRange<LSPLineCol>, children: Vec<Self>, }, MathStructure { uri: SymbolReference<LSPLineCol>, extends: Vec<(SymbolReference<LSPLineCol>, SourceRange<LSPLineCol>)>, name_range: SourceRange<LSPLineCol>, opts: Vec<MathStructureArg<LSPLineCol, Self>>, full_range: SourceRange<LSPLineCol>, children: Vec<Self>, mathstructure_range: SourceRange<LSPLineCol>, }, ConservativeExt { uri: SymbolReference<LSPLineCol>, ext_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, extstructure_range: SourceRange<LSPLineCol>, children: Vec<Self>, }, MorphismEnv { full_range: SourceRange<LSPLineCol>, name_range: SourceRange<LSPLineCol>, env_range: SourceRange<LSPLineCol>, uri: SymbolURI, star: bool, domain: ModuleOrStruct<LSPLineCol>, domain_range: SourceRange<LSPLineCol>, kind: MorphismKind, children: Vec<Self>, }, InlineMorphism { full_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, name_range: SourceRange<LSPLineCol>, uri: SymbolURI, domain: ModuleOrStruct<LSPLineCol>, domain_range: SourceRange<LSPLineCol>, kind: MorphismKind, assignments: Vec<InlineMorphAssign<LSPLineCol, Self>>, }, SemanticMacro { uri: SymbolReference<LSPLineCol>, argnum: u8, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, VariableMacro { name: Name, argnum: u8, orig: SourceRange<LSPLineCol>, sequence: bool, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, Svar { name: Name, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, arg_range: SourceRange<LSPLineCol>, name_range: Option<SourceRange<LSPLineCol>>, }, ImportModule { archive_range: Option<SourceRange<LSPLineCol>>, path_range: SourceRange<LSPLineCol>, module: ModuleReference, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, UseModule { archive_range: Option<SourceRange<LSPLineCol>>, path_range: SourceRange<LSPLineCol>, module: ModuleReference, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, UseStructure { structure: SymbolReference<LSPLineCol>, structure_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, SetMetatheory { archive_range: Option<SourceRange<LSPLineCol>>, path_range: SourceRange<LSPLineCol>, module: ModuleReference, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, Inputref { archive: Option<(ArchiveId, SourceRange<LSPLineCol>)>, filepath: (Arc<str>, SourceRange<LSPLineCol>), token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, MHInput { archive: Option<(ArchiveId, SourceRange<LSPLineCol>)>, filepath: (Arc<str>, SourceRange<LSPLineCol>), token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, Symdecl { uri: SymbolReference<LSPLineCol>, main_name_range: SourceRange<LSPLineCol>, parsed_args: Vec<SymdeclArg<LSPLineCol, Self>>, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, TextSymdecl { uri: SymbolReference<LSPLineCol>, main_name_range: SourceRange<LSPLineCol>, parsed_args: Vec<TextSymdeclArg<LSPLineCol, Self>>, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, Notation { uri: SmallVec<SymbolReference<LSPLineCol>, 1>, token_range: SourceRange<LSPLineCol>, name_range: SourceRange<LSPLineCol>, notation_args: Vec<NotationArg<LSPLineCol, Self>>, full_range: SourceRange<LSPLineCol>, }, RenameDecl { uri: SymbolReference<LSPLineCol>, token_range: SourceRange<LSPLineCol>, orig_range: SourceRange<LSPLineCol>, name_range: Option<SourceRange<LSPLineCol>>, macroname_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, Assign { uri: SymbolReference<LSPLineCol>, token_range: SourceRange<LSPLineCol>, orig_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, Symdef { uri: SymbolReference<LSPLineCol>, main_name_range: SourceRange<LSPLineCol>, parsed_args: Vec<SymdefArg<LSPLineCol, Self>>, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, Vardef { name: Name, main_name_range: SourceRange<LSPLineCol>, parsed_args: Vec<VardefArg<LSPLineCol, Self>>, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, Varseq { name: Name, main_name_range: SourceRange<LSPLineCol>, parsed_args: Vec<VardefArg<LSPLineCol, Self>>, token_range: SourceRange<LSPLineCol>, full_range: SourceRange<LSPLineCol>, }, SymName { uri: SmallVec<SymbolReference<LSPLineCol>, 1>, full_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, name_range: SourceRange<LSPLineCol>, mode: SymnameMode<LSPLineCol>, }, IncludeProblem { filepath: (Arc<str>, SourceRange<LSPLineCol>), archive: Option<(ArchiveId, SourceRange<LSPLineCol>)>, full_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, args: Vec<IncludeProblemArg<LSPLineCol>>, }, Symuse { uri: SmallVec<SymbolReference<LSPLineCol>, 1>, full_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, name_range: SourceRange<LSPLineCol>, }, Symref { uri: SmallVec<SymbolReference<LSPLineCol>, 1>, full_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, name_range: SourceRange<LSPLineCol>, text: (SourceRange<LSPLineCol>, Vec<Self>), }, Definiens { uri: SmallVec<SymbolReference<LSPLineCol>, 1>, full_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, name_range: Option<SourceRange<LSPLineCol>>, }, Defnotation { full_range: SourceRange<LSPLineCol>, }, Paragraph { kind: ParagraphKind, full_range: SourceRange<LSPLineCol>, name_range: SourceRange<LSPLineCol>, symbol: Option<SymbolReference<LSPLineCol>>, parsed_args: Vec<ParagraphArg<LSPLineCol, Self>>, children: Vec<Self>, }, Problem { sub: bool, full_range: SourceRange<LSPLineCol>, name_range: SourceRange<LSPLineCol>, parsed_args: Vec<ProblemArg<LSPLineCol, Self>>, children: Vec<Self>, }, Precondition { uri: SmallVec<SymbolReference<LSPLineCol>, 1>, full_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, dim_range: SourceRange<LSPLineCol>, symbol_range: SourceRange<LSPLineCol>, dim: CognitiveDimension, }, Objective { uri: SmallVec<SymbolReference<LSPLineCol>, 1>, full_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, dim_range: SourceRange<LSPLineCol>, symbol_range: SourceRange<LSPLineCol>, dim: CognitiveDimension, }, InlineParagraph { kind: ParagraphKind, full_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, symbol: Option<SymbolReference<LSPLineCol>>, parsed_args: Vec<ParagraphArg<LSPLineCol, Self>>, children: Vec<Self>, children_range: SourceRange<LSPLineCol>, }, MHGraphics { filepath: (Arc<str>, SourceRange<LSPLineCol>), archive: Option<(ArchiveId, SourceRange<LSPLineCol>)>, full_range: SourceRange<LSPLineCol>, token_range: SourceRange<LSPLineCol>, args: Vec<MHGraphicsArg<LSPLineCol>>, },
}

Variants§

§

Module

Fields

§smodule_range: SourceRange<LSPLineCol>
§children: Vec<Self>
§

MathStructure

§

ConservativeExt

Fields

§extstructure_range: SourceRange<LSPLineCol>
§children: Vec<Self>
§

MorphismEnv

§

InlineMorphism

§

SemanticMacro

§

VariableMacro

Fields

§name: Name
§argnum: u8
§sequence: bool
§

Svar

§

ImportModule

§

UseModule

§

UseStructure

§

SetMetatheory

§

Inputref

§

MHInput

§

Symdecl

§

TextSymdecl

§

Notation

Fields

§uri: SmallVec<SymbolReference<LSPLineCol>, 1>
§notation_args: Vec<NotationArg<LSPLineCol, Self>>
§

RenameDecl

§

Assign

§

Symdef

§

Vardef

Fields

§name: Name
§main_name_range: SourceRange<LSPLineCol>
§parsed_args: Vec<VardefArg<LSPLineCol, Self>>
§

Varseq

Fields

§name: Name
§main_name_range: SourceRange<LSPLineCol>
§parsed_args: Vec<VardefArg<LSPLineCol, Self>>
§

SymName

§

IncludeProblem

§

Symuse

§

Symref

§

Definiens

§

Defnotation

Fields

§

Paragraph

§

Problem

Fields

§parsed_args: Vec<ProblemArg<LSPLineCol, Self>>
§children: Vec<Self>
§

Precondition

§

Objective

§

InlineParagraph

Fields

§parsed_args: Vec<ParagraphArg<LSPLineCol, Self>>
§children: Vec<Self>
§children_range: SourceRange<LSPLineCol>
§

MHGraphics

Implementations§

Source§

impl STeXAnnot

Source

fn from_tokens<I: IntoIterator<Item = STeXToken<LSPLineCol>>>( iter: I, modules: Option<&mut SmallVec<(ModuleURI, ModuleRules<LSPLineCol>), 1>>, ) -> Vec<Self>

Source

pub const fn range(&self) -> SourceRange<LSPLineCol>

Trait Implementations§

Source§

impl Clone for STeXAnnot

Source§

fn clone(&self) -> STeXAnnot

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for STeXAnnot

Source§

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

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

impl Serialize for STeXAnnot

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TreeChild<STeXAnnot> for &STeXAnnot

Source§

fn children<'a>(&self) -> Option<AnnotIter<'a>>
where Self: 'a,

Source§

impl TreeLike for STeXAnnot

Source§

type Child<'a> = &'a STeXAnnot

Source§

type RefIter<'a> = AnnotIter<'a>

Source§

fn children(&self) -> Option<Self::RefIter<'_>>

Source§

fn dfs(&self) -> Option<DFSIter<'_, Self>>

Source§

fn bfs(&self) -> Option<BFSIter<'_, Self>>

Source§

fn bfs_par<'a>(&'a self) -> Option<ParSpliter<BFSIter<'a, Self>>>
where Self::Child<'a>: Send, Self::RefIter<'a>: Send,

Source§

fn dfs_with_close<'a, R, SG, SL, Open, Close>( &'a self, state: &mut SG, open: Open, close: Close, ) -> Result<(), R>
where Open: FnMut(&mut SG, Self::Child<'a>) -> Result<DFSContinuation<SL>, R>, Close: FnMut(&mut SG, SL) -> Result<(), R>,

Source§

fn display_nested<'a>( &'a self, f: &mut Formatter<'_>, open: impl Fn(&Self::Child<'a>, &mut Indentor<'_>, &mut Formatter<'_>) -> Result<DFSContinuation<()>, Error>, close: impl Fn(&Self::Child<'a>, &mut Formatter<'_>) -> Result<(), Error>, indent: Option<Indentor<'_>>, ) -> Result<(), Error>

Source§

fn display_children<'a, I>( i: I, f: &mut Formatter<'_>, open: impl Fn(&Self::Child<'a>, &mut Indentor<'_>, &mut Formatter<'_>) -> Result<DFSContinuation<()>, Error>, close: impl Fn(&Self::Child<'a>, &mut Formatter<'_>) -> Result<(), Error>, indent: Option<Indentor<'_>>, ) -> Result<(), Error>
where I: Into<Self::RefIter<'a>>, Self: 'a,

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
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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
§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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<ET, Err, A> IntoErr<ET, Err> for A
where ET: EngineTypes, Err: From<A>,

Source§

fn into_err( self, _aux: &EngineAux<ET>, _state: &<ET as EngineTypes>::State, ) -> Err

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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

impl<T> CondSerialize for T
where T: Serialize,

§

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

§

impl<T> Fruit for T
where T: Send + Downcast,