pub struct DeclarationRange {
pub start: usize,
pub end: usize,
pub end_proven: bool,
}Expand description
A declaration located in one file, in byte offsets.
Fields§
§start: usizeFirst byte of the declaration, including modifiers like pub or export.
end: usizeOne past the last byte: the closing brace, or the terminating ;.
end_proven: boolWhether the end was located in the source, or is only where the signature stopped.
A caller must not offer “insert after this declaration” on an unproven end — it would place the text in the middle of something.
Trait Implementations§
Source§impl Clone for DeclarationRange
impl Clone for DeclarationRange
Source§fn clone(&self) -> DeclarationRange
fn clone(&self) -> DeclarationRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DeclarationRange
Source§impl Debug for DeclarationRange
impl Debug for DeclarationRange
impl Eq for DeclarationRange
Source§impl PartialEq for DeclarationRange
impl PartialEq for DeclarationRange
impl StructuralPartialEq for DeclarationRange
Auto Trait Implementations§
impl Freeze for DeclarationRange
impl RefUnwindSafe for DeclarationRange
impl Send for DeclarationRange
impl Sync for DeclarationRange
impl Unpin for DeclarationRange
impl UnsafeUnpin for DeclarationRange
impl UnwindSafe for DeclarationRange
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