pub struct CallRef { /* private fields */ }Expand description
A Tool call’s id (history.md, Identity): the segment it was first
recorded in, its task and the task’s count of Tool calls, written
root/1#4 in the first segment and p1:root/1#4 in the second.
Implementations§
Source§impl CallRef
impl CallRef
Sourcepub fn new(segment: u64, task: TaskPath, index: NonZeroU64) -> CallRef
pub fn new(segment: u64, task: TaskPath, index: NonZeroU64) -> CallRef
The call index of task, first recorded in segment, 0 for the
run’s first.
Sourcepub fn first(task: TaskPath, index: NonZeroU64) -> CallRef
pub fn first(task: TaskPath, index: NonZeroU64) -> CallRef
The call index of task in the run’s first segment: a call’s
position.
Sourcepub fn parse(text: &str) -> Result<CallRef, ParsePlaceError>
pub fn parse(text: &str) -> Result<CallRef, ParsePlaceError>
The call id text writes: an optional segment pK:, a task path,
#, then the task’s count of Tool calls.
§Errors
A ParsePlaceError when text is any other text.
Sourcepub fn segment(&self) -> u64
pub fn segment(&self) -> u64
The segment the call was first recorded in, 0 for the run’s first.
Sourcepub fn index(&self) -> NonZeroU64
pub fn index(&self) -> NonZeroU64
The task’s count of Tool calls, this one included: 1 for its first.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CallRef
impl<'de> Deserialize<'de> for CallRef
Source§fn deserialize<D: Deserializer<'de>>(
deserializer: D,
) -> Result<CallRef, D::Error>
fn deserialize<D: Deserializer<'de>>( deserializer: D, ) -> Result<CallRef, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CallRef
Source§impl Ord for CallRef
impl Ord for CallRef
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for CallRef
impl PartialOrd for CallRef
impl StructuralPartialEq for CallRef
Auto Trait Implementations§
impl Forget for CallRef
impl Freeze for CallRef
impl Move for CallRef
impl RefUnwindSafe for CallRef
impl Send for CallRef
impl Sync for CallRef
impl Unpin for CallRef
impl UnsafeUnpin for CallRefwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<NonZero<u64>>: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
impl UnwindSafe for CallRef
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