pub struct CompileTimePragmaEnvironment { /* private fields */ }Expand description
Explicit compile-time pragma environment that can answer file-position queries and expose immutable snapshots.
Implementations§
Source§impl CompileTimePragmaEnvironment
impl CompileTimePragmaEnvironment
Sourcepub fn query_at(&self, offset: usize) -> PragmaStateQuery
pub fn query_at(&self, offset: usize) -> PragmaStateQuery
Return a position query object with immutable state snapshot.
Sourcepub fn snapshot_at(&self, offset: usize) -> PragmaSnapshot
pub fn snapshot_at(&self, offset: usize) -> PragmaSnapshot
Return the immutable snapshot active at the given byte offset.
Sourcepub fn as_map(&self) -> &[(Range<usize>, PragmaSnapshot)]
pub fn as_map(&self) -> &[(Range<usize>, PragmaSnapshot)]
Access the underlying range map for advanced consumers.
Trait Implementations§
Source§impl Clone for CompileTimePragmaEnvironment
impl Clone for CompileTimePragmaEnvironment
Source§fn clone(&self) -> CompileTimePragmaEnvironment
fn clone(&self) -> CompileTimePragmaEnvironment
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 CompileTimePragmaEnvironment
impl Debug for CompileTimePragmaEnvironment
Source§impl Default for CompileTimePragmaEnvironment
impl Default for CompileTimePragmaEnvironment
Source§fn default() -> CompileTimePragmaEnvironment
fn default() -> CompileTimePragmaEnvironment
Returns the “default value” for a type. Read more
Source§impl PartialEq for CompileTimePragmaEnvironment
impl PartialEq for CompileTimePragmaEnvironment
Source§fn eq(&self, other: &CompileTimePragmaEnvironment) -> bool
fn eq(&self, other: &CompileTimePragmaEnvironment) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompileTimePragmaEnvironment
Auto Trait Implementations§
impl Freeze for CompileTimePragmaEnvironment
impl RefUnwindSafe for CompileTimePragmaEnvironment
impl Send for CompileTimePragmaEnvironment
impl Sync for CompileTimePragmaEnvironment
impl Unpin for CompileTimePragmaEnvironment
impl UnsafeUnpin for CompileTimePragmaEnvironment
impl UnwindSafe for CompileTimePragmaEnvironment
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