pub struct ContextFileRef { /* private fields */ }Expand description
Validated workspace-relative file reference with an optional 1-based inclusive line range.
Implementations§
Source§impl ContextFileRef
impl ContextFileRef
Sourcepub fn parse(raw: &str) -> Result<Self, SubagentError>
pub fn parse(raw: &str) -> Result<Self, SubagentError>
Parses a file reference of the form path/to/file.rs or path/to/file.rs:1-120.
Sourcepub const fn line_range(&self) -> Option<(usize, usize)>
pub const fn line_range(&self) -> Option<(usize, usize)>
Returns the optional 1-based inclusive (start, end) line range.
Sourcepub fn display_label(&self) -> String
pub fn display_label(&self) -> String
Formats the canonical reference label (path or path:start-end).
Trait Implementations§
Source§impl Clone for ContextFileRef
impl Clone for ContextFileRef
Source§impl Debug for ContextFileRef
impl Debug for ContextFileRef
impl Eq for ContextFileRef
Source§impl PartialEq for ContextFileRef
impl PartialEq for ContextFileRef
impl StructuralPartialEq for ContextFileRef
Auto Trait Implementations§
impl Forget for ContextFileRef
impl Freeze for ContextFileRef
impl Move for ContextFileRef
impl RefUnwindSafe for ContextFileRef
impl Send for ContextFileRefwhere
RawVecInner: Send,
impl Sync for ContextFileRefwhere
RawVecInner: Sync,
impl Unpin for ContextFileRef
impl UnsafeUnpin for ContextFileRef
impl UnwindSafe for ContextFileRefwhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.