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: NonZero<u64>) -> CallRef
pub fn new(segment: u64, task: TaskPath, index: NonZero<u64>) -> CallRef
The call index of task, first recorded in segment, 0 for the
run’s first.
Sourcepub fn first(task: TaskPath, index: NonZero<u64>) -> CallRef
pub fn first(task: TaskPath, index: NonZero<u64>) -> 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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CallRef
impl<'de> Deserialize<'de> for CallRef
Source§fn deserialize<D>(
deserializer: D,
) -> Result<CallRef, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<CallRef, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
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
Source§impl Serialize for CallRef
impl Serialize for CallRef
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Shaped for CallRef
impl Shaped for CallRef
Source§fn write_at(
&self,
out: &mut ValueWriter<'_, '_>,
ty: &Type,
) -> Result<(), EncodeError>
fn write_at( &self, out: &mut ValueWriter<'_, '_>, ty: &Type, ) -> Result<(), EncodeError>
Source§fn read_at(
input: &mut ValueReader<'_, '_, '_>,
ty: &Type,
) -> Result<CallRef, DecodeError>
fn read_at( input: &mut ValueReader<'_, '_, '_>, ty: &Type, ) -> Result<CallRef, DecodeError>
impl StructuralPartialEq for CallRef
Source§impl Wire for CallRef
A call id is written as history writes it (trace.md, Facts): its
segment, its task id and its counter.
impl Wire for CallRef
A call id is written as history writes it (trace.md, Facts): its
segment, its task id and its counter.
Source§fn write_head<'a>(&'a self, out: &mut Vec<u8>, _: &mut Vec<&'a dyn AnyWire>)
fn write_head<'a>(&'a self, out: &mut Vec<u8>, _: &mut Vec<&'a dyn AnyWire>)
Appends the bytes it writes before its parts to
out, and pushes
its parts to parts in the order they are written after them.Source§fn open(reader: &mut Reader<'_>) -> Result<Opened, DecodeError>
fn open(reader: &mut Reader<'_>) -> Result<Opened, DecodeError>
Reads its head at
reader: the value itself when it has no parts,
else its parts to read and what joins them. Read moreSource§fn write(&self, out: &mut Vec<u8>)
fn write(&self, out: &mut Vec<u8>)
Appends its bytes to
out: its head, and then each part’s bytes in
order, written over a stack on the heap, so a value nested however
deep is written on a native stack of fixed size.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> AnyWire for Twhere
T: Wire,
impl<T> AnyWire for Twhere
T: Wire,
Source§fn write_head<'a>(&'a self, out: &mut Vec<u8>, parts: &mut Vec<&'a dyn AnyWire>)
fn write_head<'a>(&'a self, out: &mut Vec<u8>, parts: &mut Vec<&'a dyn AnyWire>)
As
Wire::write_head.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