pub struct AddrHash(/* private fields */);Expand description
128-bit routing identifier for an actor.
Composed of:
- 64 bits: BLAKE3 hash of the actor’s canonical path.
- 64 bits: Generation ID (monotonically increasing, assigned by engine).
Not directly constructable outside this crate — only from_path (deprecated)
or the new generation-aware constructors produce valid instances.
Implementations§
Source§impl AddrHash
impl AddrHash
Sourcepub fn new(path: &ActorPath, generation: u64) -> Self
pub fn new(path: &ActorPath, generation: u64) -> Self
Create a new AddrHash from a path and a generation ID.
Sourcepub fn from_parts(path_hash: u64, generation: u64) -> Self
pub fn from_parts(path_hash: u64, generation: u64) -> Self
Internal: assemble from raw path hash and generation.
Sourcepub fn from_path(path: &ActorPath) -> Self
pub fn from_path(path: &ActorPath) -> Self
DEPRECATED: Use AddrHash::new(path, gen).
Currently defaults generation to 0 for transition.
Sourcepub fn synthetic(bytes: &[u8]) -> Self
pub fn synthetic(bytes: &[u8]) -> Self
Derive an AddrHash from arbitrary bytes — used for synthetic addresses
(ask correlation channels, timer callbacks). Uses 0 for generation.
pub fn path_hash(self) -> u64
pub fn generation(self) -> u64
pub fn as_u128(self) -> u128
Trait Implementations§
Source§impl Ord for AddrHash
impl Ord for AddrHash
Source§impl PartialOrd for AddrHash
impl PartialOrd for AddrHash
impl Copy for AddrHash
impl Eq for AddrHash
impl StructuralPartialEq for AddrHash
Auto Trait Implementations§
impl Freeze for AddrHash
impl RefUnwindSafe for AddrHash
impl Send for AddrHash
impl Sync for AddrHash
impl Unpin for AddrHash
impl UnsafeUnpin for AddrHash
impl UnwindSafe for AddrHash
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