pub struct NodeEncoder { /* private fields */ }Expand description
Walks a normalised tree and feeds it to a StableHasher in a form that
does not change when the code around it does.
Every variant is written as its own name rather than its position in the
enum, so reordering NodeKind – or inserting a variant in the middle –
leaves existing fingerprints alone. Every match here is exhaustive, so a
new variant is a compile error rather than a silently unhashed field.
Children are written with their count in front, which is what stops
[a, [b]] and [[a], b] from hashing alike.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeEncoder
impl RefUnwindSafe for NodeEncoder
impl Send for NodeEncoder
impl Sync for NodeEncoder
impl Unpin for NodeEncoder
impl UnsafeUnpin for NodeEncoder
impl UnwindSafe for NodeEncoder
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