pub struct Acronym(/* private fields */);Expand description
The acronym of a GameMod.
Implementations§
source§impl Acronym
impl Acronym
sourcepub const unsafe fn from_str_unchecked(s: &str) -> Self
pub const unsafe fn from_str_unchecked(s: &str) -> Self
Create an Acronym from a string.
§Safety
The given string must consist of two or three bytes representing capitalized ASCII letters or digits.
§Example
use rosu_mods::Acronym;
let hd = unsafe { Acronym::from_str_unchecked("HD") };
assert_eq!(hd.as_str(), "HD");Each of the following may lead to undefined behavior, don’t do that!
let _ = unsafe { Acronym::from_str_unchecked("HDHR") }; // must be 2 or 3 characters
let _ = unsafe { Acronym::from_str_unchecked("hd") }; // must be uppercaseTrait Implementations§
source§impl Archive for Acronym
Available on crate feature rkyv only.
impl Archive for Acronym
Available on crate feature
rkyv only.source§impl<C: ?Sized> CheckBytes<C> for Acronym
Available on crate feature rkyv only.
impl<C: ?Sized> CheckBytes<C> for Acronym
Available on crate feature
rkyv only.§type Error = TupleStructCheckError
type Error = TupleStructCheckError
The error that may result from checking the type.
source§unsafe fn check_bytes<'a>(
value: *const Self,
ctx: &mut C,
) -> Result<&'a Self, TupleStructCheckError>
unsafe fn check_bytes<'a>( value: *const Self, ctx: &mut C, ) -> Result<&'a Self, TupleStructCheckError>
Checks whether the given pointer points to a valid value within the
given context. Read more
source§impl<'de> Deserialize<'de> for Acronym
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Acronym
Available on crate feature
serde only.source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl<D: Fallible + ?Sized> Deserialize<Acronym, D> for Acronym
Available on crate feature rkyv only.
impl<D: Fallible + ?Sized> Deserialize<Acronym, D> for Acronym
Available on crate feature
rkyv only.source§impl Ord for Acronym
impl Ord for Acronym
source§impl PartialEq for Acronym
impl PartialEq for Acronym
source§impl PartialOrd for Acronym
impl PartialOrd for Acronym
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 moresource§impl TryFrom<Acronym> for GameModsLegacy
impl TryFrom<Acronym> for GameModsLegacy
impl Copy for Acronym
impl Eq for Acronym
impl StructuralPartialEq for Acronym
Auto Trait Implementations§
impl Freeze for Acronym
impl RefUnwindSafe for Acronym
impl Send for Acronym
impl Sync for Acronym
impl Unpin for Acronym
impl UnwindSafe for Acronym
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike
Archive, it may be unsized. Read more§type MetadataResolver = ()
type MetadataResolver = ()
The resolver for the metadata of this type. Read more
source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata,
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata, )
Creates the archived version of the metadata for this value at the given position and writes
it to the given output. Read more
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
source§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.