pub enum FuncIdentifier<'a> {
Hashed(u32),
Name(&'a str),
Bytes(&'a [u8]),
}Expand description
Represents different forms of a function identifier that can be used for hashing.
This enum allows identifying a function either by:
- A precomputed 32-bit hash value (
Hashed) - A string slice containing the function name (
Name) - A raw byte slice (
Bytes)
Lifetime 'a is used to ensure that borrowed data (&str, &[u8]) outlives the identifier.
Variants§
Hashed(u32)
A precomputed 32-bit hash value.
Name(&'a str)
A borrowed string slice representing the function name.
Bytes(&'a [u8])
A borrowed byte slice representing the function name.
Trait Implementations§
Source§impl<'a> From<&'a [u8]> for FuncIdentifier<'a>
impl<'a> From<&'a [u8]> for FuncIdentifier<'a>
Source§impl<'a> From<&'a str> for FuncIdentifier<'a>
impl<'a> From<&'a str> for FuncIdentifier<'a>
Auto Trait Implementations§
impl<'a> Freeze for FuncIdentifier<'a>
impl<'a> RefUnwindSafe for FuncIdentifier<'a>
impl<'a> Send for FuncIdentifier<'a>
impl<'a> Sync for FuncIdentifier<'a>
impl<'a> Unpin for FuncIdentifier<'a>
impl<'a> UnsafeUnpin for FuncIdentifier<'a>
impl<'a> UnwindSafe for FuncIdentifier<'a>
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