pub struct GrammarMetadata { /* private fields */ }Implementations§
Source§impl GrammarMetadata
impl GrammarMetadata
Sourcepub const fn new(
grammar_file_name: &'static str,
rule_names: &'static [&'static str],
literal_names: &'static [Option<&'static str>],
symbolic_names: &'static [Option<&'static str>],
display_names: &'static [Option<&'static str>],
channel_names: &'static [&'static str],
mode_names: &'static [&'static str],
serialized_atn: &'static [i32],
) -> Self
pub const fn new( grammar_file_name: &'static str, rule_names: &'static [&'static str], literal_names: &'static [Option<&'static str>], symbolic_names: &'static [Option<&'static str>], display_names: &'static [Option<&'static str>], channel_names: &'static [&'static str], mode_names: &'static [&'static str], serialized_atn: &'static [i32], ) -> Self
Creates static grammar metadata emitted by the Rust target generator.
pub const fn grammar_file_name(&self) -> &'static str
pub const fn rule_names(&self) -> &'static [&'static str]
pub const fn channel_names(&self) -> &'static [&'static str]
pub const fn mode_names(&self) -> &'static [&'static str]
pub fn vocabulary(&self) -> Vocabulary
Sourcepub const fn serialized_atn(&self) -> SerializedAtn<'_>
pub const fn serialized_atn(&self) -> SerializedAtn<'_>
Borrows the serialized ATN values for deserialization by the runtime simulators without copying generated static data.
Trait Implementations§
Source§impl Clone for GrammarMetadata
impl Clone for GrammarMetadata
Source§fn clone(&self) -> GrammarMetadata
fn clone(&self) -> GrammarMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GrammarMetadata
impl RefUnwindSafe for GrammarMetadata
impl Send for GrammarMetadata
impl Sync for GrammarMetadata
impl Unpin for GrammarMetadata
impl UnsafeUnpin for GrammarMetadata
impl UnwindSafe for GrammarMetadata
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