pub struct EureSource {
pub leading_trivia: Vec<Trivia>,
pub value: Option<NodeId>,
pub bindings: Vec<BindingSource>,
pub sections: Vec<SectionSource>,
pub trailing_trivia: Vec<Trivia>,
}Expand description
A source-level Eure document/block.
Mirrors grammar: Eure: [ ValueBinding ] { Binding } { Section } ;
Fields§
§leading_trivia: Vec<Trivia>Comments/blank lines before the first item (value, binding, or section)
value: Option<NodeId>Optional initial value binding: [ ValueBinding ]
bindings: Vec<BindingSource>Bindings in order: { Binding }
sections: Vec<SectionSource>Sections in order: { Section }
trailing_trivia: Vec<Trivia>Comments/blank lines after the last item
Implementations§
Source§impl EureSource
impl EureSource
Sourcepub fn push_binding(&mut self, binding: BindingSource)
pub fn push_binding(&mut self, binding: BindingSource)
Add a binding to this source.
Sourcepub fn push_section(&mut self, section: SectionSource)
pub fn push_section(&mut self, section: SectionSource)
Add a section to this source.
Trait Implementations§
Source§impl Clone for EureSource
impl Clone for EureSource
Source§fn clone(&self) -> EureSource
fn clone(&self) -> EureSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EureSource
impl Debug for EureSource
Source§impl Default for EureSource
impl Default for EureSource
Source§fn default() -> EureSource
fn default() -> EureSource
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EureSource
impl RefUnwindSafe for EureSource
impl Send for EureSource
impl Sync for EureSource
impl Unpin for EureSource
impl UnwindSafe for EureSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more