#[non_exhaustive]pub struct Injection {
pub language: InjectedLanguage,
pub range: Range<usize>,
}Expand description
An embedded-language region inside a $$ … $$ body. Built by detect_injections; consumers
can re-highlight the range with the embedded grammar named by
language. #[non_exhaustive] so fields can be added compatibly.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.language: InjectedLanguageThe embedded language declared (or inferred) for this body.
range: Range<usize>Byte range of the dollar-quoted body including its $$ delimiters.
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