pub struct Tag(/* private fields */);Expand description
A country’s tag: three ASCII letters or digits, e.g. RUS.
Implementations§
Source§impl Tag
impl Tag
Sourcepub fn new(text: &str) -> Option<Self>
pub fn new(text: &str) -> Option<Self>
The tag of text, None unless it is three ASCII letters or digits.
The world service ignores case; the tag keeps it as given.
Sourcepub fn from_raw(raw: &AnvilGameTag) -> Option<Self>
pub fn from_raw(raw: &AnvilGameTag) -> Option<Self>
The tag a service wrote; None for “” (no country).
Sourcepub fn to_raw(self) -> AnvilGameTag
pub fn to_raw(self) -> AnvilGameTag
The tag as the C API takes it: three characters and a NUL.
Trait Implementations§
impl Copy for Tag
impl Eq for Tag
Source§impl Ord for Tag
impl Ord for Tag
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Tag
impl PartialOrd for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl Forget for Tag
impl Freeze for Tag
impl Move for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnsafeUnpin for Tag
impl UnwindSafe for Tag
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