pub struct StableFaceId(/* private fields */);Expand description
A logical face identity that can survive a source-file move. 可跨源码文件移动保持不变的逻辑注册面身份。
NodeId is the source-instance identity used by the tree and pruning.
StableFaceId is opt-in and survives a source-file move.
NodeId 是注册树和修剪使用的源码实例身份;StableFaceId 可跨文件移动保持不变。
Implementations§
Source§impl StableFaceId
impl StableFaceId
Sourcepub const fn from_name(name: &str) -> StableFaceId
pub const fn from_name(name: &str) -> StableFaceId
Hash an author-owned logical name, independent of its source path. 对作者拥有的逻辑名称做哈希,与源码路径无关。
Sourcepub const fn into_bytes(self) -> [u8; 16]
pub const fn into_bytes(self) -> [u8; 16]
The raw 128-bit identity behind this author-owned stable name. 该作者拥有的稳定名称背后的原始 128 位身份。
Trait Implementations§
Source§impl Clone for StableFaceId
impl Clone for StableFaceId
Source§fn clone(&self) -> StableFaceId
fn clone(&self) -> StableFaceId
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 moreimpl Copy for StableFaceId
Source§impl Debug for StableFaceId
impl Debug for StableFaceId
Source§impl Display for StableFaceId
impl Display for StableFaceId
impl Eq for StableFaceId
Source§impl Hash for StableFaceId
impl Hash for StableFaceId
Source§impl Ord for StableFaceId
impl Ord for StableFaceId
Source§fn cmp(&self, other: &StableFaceId) -> Ordering
fn cmp(&self, other: &StableFaceId) -> Ordering
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 PartialEq for StableFaceId
impl PartialEq for StableFaceId
Source§impl PartialOrd for StableFaceId
impl PartialOrd for StableFaceId
impl StructuralPartialEq for StableFaceId
Auto Trait Implementations§
impl Freeze for StableFaceId
impl RefUnwindSafe for StableFaceId
impl Send for StableFaceId
impl Sync for StableFaceId
impl Unpin for StableFaceId
impl UnsafeUnpin for StableFaceId
impl UnwindSafe for StableFaceId
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