Struct red4ext_rs::types::CName
source · pub struct CName(/* private fields */);
Expand description
A hash representing an immutable string stored in a global name pool.
Implementations§
source§impl CName
impl CName
sourcepub const fn new(name: &str) -> Self
pub const fn new(name: &str) -> Self
Creates a new CName
from the given string.
This function just calculates the hash of the string using the FNV-1a algorithm.
If you want it to be added to the global name pool, use CNamePool::add_cstr
.
pub const fn from_bytes(name: &[u8]) -> Self
Trait Implementations§
source§impl Ord for CName
impl Ord for CName
source§impl PartialEq for CName
impl PartialEq for CName
source§impl PartialOrd for CName
impl PartialOrd for CName
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for CName
impl Eq for CName
Auto Trait Implementations§
impl Freeze for CName
impl RefUnwindSafe for CName
impl Send for CName
impl Sync for CName
impl Unpin for CName
impl UnwindSafe for CName
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