pub struct DjangoLanguage {
pub strict_mode: bool,
pub allow_custom_tags: bool,
}Expand description
Django 模板语言配置
Fields§
§strict_mode: bool是否启用严格模式
是否允许自定义标签
Implementations§
Trait Implementations§
Source§impl Clone for DjangoLanguage
impl Clone for DjangoLanguage
Source§fn clone(&self) -> DjangoLanguage
fn clone(&self) -> DjangoLanguage
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 DjangoLanguage
impl Debug for DjangoLanguage
Source§impl Default for DjangoLanguage
impl Default for DjangoLanguage
Source§impl<'de> Deserialize<'de> for DjangoLanguage
impl<'de> Deserialize<'de> for DjangoLanguage
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 Language for DjangoLanguage
impl Language for DjangoLanguage
Source§const CATEGORY: LanguageCategory = LanguageCategory::Programming
const CATEGORY: LanguageCategory = LanguageCategory::Programming
The category of the language.
Source§type TokenType = DjangoSyntaxKind
type TokenType = DjangoSyntaxKind
The token type used to represent different token and node types in the language. Read more
Source§type ElementType = DjangoSyntaxKind
type ElementType = DjangoSyntaxKind
The element type used to represent composite structures in the parsed tree. Read more
Source§type TypedRoot = DjangoRoot
type TypedRoot = DjangoRoot
The root type for the parsed tree that represents the top-level structure of the language. Read more
Source§impl<'config> Lexer<DjangoLanguage> for DjangoLexer<'config>
impl<'config> Lexer<DjangoLanguage> for DjangoLexer<'config>
Source§fn lex<'a, S: Source + ?Sized>(
&self,
source: &S,
_edits: &[TextEdit],
cache: &'a mut impl LexerCache<DjangoLanguage>,
) -> LexOutput<DjangoLanguage>
fn lex<'a, S: Source + ?Sized>( &self, source: &S, _edits: &[TextEdit], cache: &'a mut impl LexerCache<DjangoLanguage>, ) -> LexOutput<DjangoLanguage>
Tokenizes the given source text into a sequence of tokens. Read more
Source§impl<'config> Parser<DjangoLanguage> for DjangoParser<'config>
impl<'config> Parser<DjangoLanguage> for DjangoParser<'config>
Source§fn parse<'a, S: Source + ?Sized>(
&self,
text: &'a S,
edits: &[TextEdit],
cache: &'a mut impl ParseCache<DjangoLanguage>,
) -> ParseOutput<'a, DjangoLanguage>
fn parse<'a, S: Source + ?Sized>( &self, text: &'a S, edits: &[TextEdit], cache: &'a mut impl ParseCache<DjangoLanguage>, ) -> ParseOutput<'a, DjangoLanguage>
The core parsing entry point. Read more
Auto Trait Implementations§
impl Freeze for DjangoLanguage
impl RefUnwindSafe for DjangoLanguage
impl Send for DjangoLanguage
impl Sync for DjangoLanguage
impl Unpin for DjangoLanguage
impl UnwindSafe for DjangoLanguage
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