pub struct Syntax { /* private fields */ }Expand description
The rules of one language, ready to scan text with.
Implementations§
Source§impl Syntax
impl Syntax
Sourcepub fn load(path: &Path) -> Result<Self, Error>
pub fn load(path: &Path) -> Result<Self, Error>
Reads a language file.
§Errors
Returns Error::Read if the file cannot be opened or holds a
duplicate key, and Error::Rule if a rule lacks the words it needs —
block_comment without both delimiters, or strings without one.
Auto Trait Implementations§
impl Freeze for Syntax
impl RefUnwindSafe for Syntax
impl Send for Syntax
impl Sync for Syntax
impl Unpin for Syntax
impl UnsafeUnpin for Syntax
impl UnwindSafe for Syntax
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