pub struct SyntaxDefinition {
pub name: Option<String>,
pub file_extensions: Vec<String>,
pub hidden_file_extensions: Vec<String>,
pub first_line_match: Option<String>,
pub scope: String,
pub version: u32,
pub extends: Option<Extends>,
pub hidden: bool,
pub variables: HashMap<String, String>,
pub contexts: HashMap<String, Vec<RawContextPattern>>,
}Expand description
Raw YAML .sublime-syntax definition.
Fields§
§name: Option<String>Optional human-readable name.
file_extensions: Vec<String>File extensions associated with this syntax.
File extensions that should be hidden from UI pickers.
first_line_match: Option<String>Optional first-line regex used to detect the syntax.
scope: StringRoot scope (e.g. source.rust).
version: u32Syntax format version (defaults to 2).
extends: Option<Extends>Optional inheritance chain.
Whether this syntax is hidden.
variables: HashMap<String, String>Variables used for regex substitution.
contexts: HashMap<String, Vec<RawContextPattern>>Contexts keyed by context name.
Trait Implementations§
Source§impl Clone for SyntaxDefinition
impl Clone for SyntaxDefinition
Source§fn clone(&self) -> SyntaxDefinition
fn clone(&self) -> SyntaxDefinition
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 SyntaxDefinition
impl Debug for SyntaxDefinition
Source§impl<'de> Deserialize<'de> for SyntaxDefinition
impl<'de> Deserialize<'de> for SyntaxDefinition
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
Auto Trait Implementations§
impl Freeze for SyntaxDefinition
impl RefUnwindSafe for SyntaxDefinition
impl Send for SyntaxDefinition
impl Sync for SyntaxDefinition
impl Unpin for SyntaxDefinition
impl UnsafeUnpin for SyntaxDefinition
impl UnwindSafe for SyntaxDefinition
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