pub struct PartitionHandle<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: HostTypes> PartitionHandle<H>
impl<H: HostTypes> PartitionHandle<H>
Sourcepub const fn from_fingerprint(fingerprint: ContentFingerprint) -> Self
pub const fn from_fingerprint(fingerprint: ContentFingerprint) -> Self
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: PartitionResolver<H>>(
&self,
resolver: &R,
) -> Option<PartitionRecord<H>>
pub fn resolve_with<R: PartitionResolver<H>>( &self, resolver: &R, ) -> Option<PartitionRecord<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: HostTypes> Clone for PartitionHandle<H>
impl<H: HostTypes> Clone for PartitionHandle<H>
Source§impl<H: HostTypes> Hash for PartitionHandle<H>
impl<H: HostTypes> Hash for PartitionHandle<H>
Source§impl<H: HostTypes> PartialEq for PartitionHandle<H>
impl<H: HostTypes> PartialEq for PartitionHandle<H>
impl<H: HostTypes> Copy for PartitionHandle<H>
impl<H: HostTypes> Eq for PartitionHandle<H>
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