pub struct TextSpan {
pub start: TextOffset,
pub end: TextOffset,
}Expand description
A range of text offsets that form a span (like text selection).
Fields§
§start: TextOffset§end: TextOffsetImplementations§
Source§impl TextSpan
impl TextSpan
Sourcepub fn new(start: TextOffset, end: TextOffset) -> TextSpan
pub fn new(start: TextOffset, end: TextOffset) -> TextSpan
Create a new TextSpan.
Sourcepub fn call_site() -> Self
pub fn call_site() -> Self
Create a new TextSpan, located at the invocation of the current procedural macro.
Identifiers created with this span will be resolved as if they were written directly at
the macro call location (call-site hygiene).
Trait Implementations§
impl Eq for TextSpan
impl StructuralPartialEq for TextSpan
Auto Trait Implementations§
impl Freeze for TextSpan
impl RefUnwindSafe for TextSpan
impl Send for TextSpan
impl Sync for TextSpan
impl Unpin for TextSpan
impl UnwindSafe for TextSpan
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