pub struct ContentKey(/* private fields */);Expand description
Content-addressed identity for an EvalRequest.
A ContentKey wraps a small Datum that records the content id of the
canonical request datum. The canonical request includes the expression,
required capabilities sorted lexicographically, consistency, mode, answer
limit, stream buffer, stream flag, and trace flag.
Excluded fields are deliberate: deadline is a scheduling bound, not part
of the requested work, and result_shape is currently a process-local
runtime value rather than stable content-addressed data.
Implementations§
Source§impl ContentKey
impl ContentKey
Sourcepub fn from_request(request: &EvalRequest) -> Self
pub fn from_request(request: &EvalRequest) -> Self
Derives a deterministic content key from the stable fields of request.
Sourcepub fn into_datum(self) -> Datum
pub fn into_datum(self) -> Datum
Consumes this key and returns its datum representation.
Trait Implementations§
Source§impl Clone for ContentKey
impl Clone for ContentKey
Source§fn clone(&self) -> ContentKey
fn clone(&self) -> ContentKey
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 moreSource§impl Debug for ContentKey
impl Debug for ContentKey
impl Eq for ContentKey
Source§impl Hash for ContentKey
impl Hash for ContentKey
Source§impl Ord for ContentKey
impl Ord for ContentKey
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
Source§impl PartialEq for ContentKey
impl PartialEq for ContentKey
Source§fn eq(&self, other: &ContentKey) -> bool
fn eq(&self, other: &ContentKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ContentKey
impl PartialOrd for ContentKey
impl StructuralPartialEq for ContentKey
Auto Trait Implementations§
impl Freeze for ContentKey
impl RefUnwindSafe for ContentKey
impl Send for ContentKey
impl Sync for ContentKey
impl Unpin for ContentKey
impl UnsafeUnpin for ContentKey
impl UnwindSafe for ContentKey
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