Struct uasset::NameReference
source · pub struct NameReference {
pub index: u32,
pub number: Option<NonZeroU32>,
}
Expand description
A reference to a name in the AssetHeader::names
name table. You can use AssetHeader::resolve_name
to get a human-readable
string from a NameReference
. It only makes sense to compare NameReference
s from the same AssetHeader
.
Fields§
§index: u32
The index in the name table
number: Option<NonZeroU32>
If present, one greater than an optional suffix on the name (Some(1)
means the name should have _0
appended to it).
The oddness with it being non-zero is based on how this is serialized. You should use
Trait Implementations§
source§impl Clone for NameReference
impl Clone for NameReference
source§fn clone(&self) -> NameReference
fn clone(&self) -> NameReference
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NameReference
impl Debug for NameReference
source§impl PartialEq<NameReference> for NameReference
impl PartialEq<NameReference> for NameReference
source§fn eq(&self, other: &NameReference) -> bool
fn eq(&self, other: &NameReference) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for NameReference
impl StructuralPartialEq for NameReference
Auto Trait Implementations§
impl RefUnwindSafe for NameReference
impl Send for NameReference
impl Sync for NameReference
impl Unpin for NameReference
impl UnwindSafe for NameReference
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