pub struct GrammarConfig {
pub dylib_overrides: Option<HashMap<String, String>>,
pub file_associations: Option<HashMap<String, String>>,
}
Expand description
Configuration options pertaining to loading grammars and parsing files.
Fields§
§dylib_overrides: Option<HashMap<String, String>>
Set which dynamic library files should be used for different languages.
This is a mapping from language strings to absolute file paths, relative filepaths, or file names.
file_associations: Option<HashMap<String, String>>
Override the languages that get resolved for different extensions.
This is a mapping from extension names to language strings. For example:
"cpp" => "cpp"
Trait Implementations§
Source§impl Clone for GrammarConfig
impl Clone for GrammarConfig
Source§fn clone(&self) -> GrammarConfig
fn clone(&self) -> GrammarConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GrammarConfig
impl Debug for GrammarConfig
Source§impl Default for GrammarConfig
impl Default for GrammarConfig
Source§fn default() -> GrammarConfig
fn default() -> GrammarConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GrammarConfig
impl<'de> Deserialize<'de> for GrammarConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GrammarConfig
impl PartialEq for GrammarConfig
Source§impl Serialize for GrammarConfig
impl Serialize for GrammarConfig
impl Eq for GrammarConfig
impl StructuralPartialEq for GrammarConfig
Auto Trait Implementations§
impl Freeze for GrammarConfig
impl RefUnwindSafe for GrammarConfig
impl Send for GrammarConfig
impl Sync for GrammarConfig
impl Unpin for GrammarConfig
impl UnwindSafe for GrammarConfig
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