pub struct Injection {
pub start: u32,
pub end: u32,
pub language: String,
pub include_children: bool,
}Expand description
An injection point for embedded languages.
Injections are detected by the grammar’s injection query. For example,
HTML can inject CSS and JavaScript into <style> and <script> tags.
Fields§
§start: u32Byte offset where the injection starts (inclusive).
end: u32Byte offset where the injection ends (exclusive).
language: StringThe language to inject (e.g., “javascript”, “css”).
include_children: boolWhether to include the node’s children in the injection range.
Trait Implementations§
impl Eq for Injection
impl StructuralPartialEq for Injection
Auto Trait Implementations§
impl Freeze for Injection
impl RefUnwindSafe for Injection
impl Send for Injection
impl Sync for Injection
impl Unpin for Injection
impl UnsafeUnpin for Injection
impl UnwindSafe for Injection
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