pub struct PartitionHandle<H>where
H: HostTypes,{ /* private fields */ }Expand description
Content-addressed identity token for a partition. Carries only a
fingerprint; partition data is recovered by pairing the handle with a
PartitionResolver via resolve_with. Handles compare and hash by
fingerprint, so they can serve as keys in content-addressed indices
without resolver access.
Implementations§
Source§impl<H> PartitionHandle<H>where
H: HostTypes,
impl<H> PartitionHandle<H>where
H: HostTypes,
Sourcepub const fn from_fingerprint(
fingerprint: ContentFingerprint,
) -> PartitionHandle<H>
pub const fn from_fingerprint( fingerprint: ContentFingerprint, ) -> PartitionHandle<H>
Construct a handle from a content fingerprint.
Sourcepub const fn fingerprint(&self) -> ContentFingerprint
pub const fn fingerprint(&self) -> ContentFingerprint
Return the content fingerprint this handle references.
Sourcepub fn resolve_with<R>(&self, resolver: &R) -> Option<PartitionRecord<H>>where
R: PartitionResolver<H>,
pub fn resolve_with<R>(&self, resolver: &R) -> Option<PartitionRecord<H>>where
R: PartitionResolver<H>,
Resolve this handle against a consumer-supplied resolver.
Returns None if the resolver has no record for this fingerprint.
Trait Implementations§
Source§impl<H> Clone for PartitionHandle<H>where
H: HostTypes,
impl<H> Clone for PartitionHandle<H>where
H: HostTypes,
Source§fn clone(&self) -> PartitionHandle<H>
fn clone(&self) -> PartitionHandle<H>
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<H> Debug for PartitionHandle<H>
impl<H> Debug for PartitionHandle<H>
Source§impl<H> Hash for PartitionHandle<H>where
H: HostTypes,
impl<H> Hash for PartitionHandle<H>where
H: HostTypes,
Source§impl<H> PartialEq for PartitionHandle<H>where
H: HostTypes,
impl<H> PartialEq for PartitionHandle<H>where
H: HostTypes,
Source§fn eq(&self, other: &PartitionHandle<H>) -> bool
fn eq(&self, other: &PartitionHandle<H>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<H> Copy for PartitionHandle<H>where
H: HostTypes,
impl<H> Eq for PartitionHandle<H>where
H: HostTypes,
Auto Trait Implementations§
impl<H> Freeze for PartitionHandle<H>
impl<H> RefUnwindSafe for PartitionHandle<H>where
H: RefUnwindSafe,
impl<H> Send for PartitionHandle<H>where
H: Send,
impl<H> Sync for PartitionHandle<H>where
H: Sync,
impl<H> Unpin for PartitionHandle<H>where
H: Unpin,
impl<H> UnsafeUnpin for PartitionHandle<H>
impl<H> UnwindSafe for PartitionHandle<H>where
H: 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