Enum subscript_compiler::backend::ast::Ast [−][src]
pub enum Ast<'a> { Tag(Tag<'a>), Enclosure(Enclosure<'a, Ast<'a>>), Ident(Atom<'a>), Content(Atom<'a>), Token(Atom<'a>), }
Variants
Tag(Tag<'a>)
Some other enclosure, perhaps as a result of an error, such as in the case of curly braces or square parentheses thar Isn’t affiliated with a block node. Parentheses are fine though, since it’s used in math mode.
Ident(Atom<'a>)
Some identifier not followed by a block.
Content(Atom<'a>)
Token(Atom<'a>)
Implementations
impl<'a> Ast<'a>
[src]
impl<'a> Ast<'a>
[src]pub fn new_fragment(nodes: Vec<Self>) -> Self
[src]
pub fn into_fragment(self) -> Vec<Self>
[src]
pub fn into_fragment(self) -> Vec<Self>
[src]Unpacks an Ast::Enclosure
with the Fragment
kind or
returns a singleton vec.
pub fn is_named_block(&self, name: &str) -> bool
[src]
pub fn is_tag(&self) -> bool
[src]
pub fn is_ident(&self) -> bool
[src]
pub fn is_enclosure(&self) -> bool
[src]
pub fn is_content(&self) -> bool
[src]
pub fn is_token(&self) -> bool
[src]
pub fn unpack_tag(&self) -> Option<&Tag<'a>>
[src]
pub fn unpack_tag_mut(&mut self) -> Option<&mut Tag<'a>>
[src]
pub fn unpack_ident(&self) -> Option<&Atom<'a>>
[src]
pub fn unpack_enclosure(&self) -> Option<&Enclosure<'a, Ast<'a>>>
[src]
pub fn unpack_content(&self) -> Option<&Atom<'a>>
[src]
pub fn unpack_content_mut(&mut self) -> Option<&mut Atom<'a>>
[src]
pub fn unpack_token(&self) -> Option<&Atom<'a>>
[src]
pub fn into_tag(self) -> Option<Tag<'a>>
[src]
pub fn into_enclosure(self) -> Option<Enclosure<'a, Ast<'a>>>
[src]
pub fn into_enclosure_children(
self,
kind: EnclosureKind<'_>
) -> Option<Vec<Ast<'a>>>
[src]
self,
kind: EnclosureKind<'_>
) -> Option<Vec<Ast<'a>>>
pub fn into_ident(self) -> Option<Atom<'a>>
[src]
pub fn into_parens(self) -> Option<Enclosure<'a, Ast<'a>>>
[src]
pub fn into_content(self) -> Option<Atom<'a>>
[src]
pub fn into_token(self) -> Option<Atom<'a>>
[src]
pub fn unsafe_unwrap_ident(&self) -> &Atom<'a>
[src]
pub fn is_whitespace(&self) -> bool
[src]
pub fn to_string(self) -> String
[src]
pub fn unblock(self) -> Vec<Self>
[src]
Trait Implementations
impl<'a> StructuralPartialEq for Ast<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Ast<'a>
impl<'a> Send for Ast<'a>
impl<'a> Sync for Ast<'a>
impl<'a> Unpin for Ast<'a>
impl<'a> UnwindSafe for Ast<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more