pub struct LogicLong<T = u32>{
pub high: T,
pub low: T,
pub tag: String,
}
Fields§
§high: T
§low: T
§tag: String
Implementations§
Source§impl<T> LogicLong<T>
impl<T> LogicLong<T>
pub fn new(high: T, low: T) -> Self
Sourcepub fn is_valid_tag(tag: &str) -> bool
pub fn is_valid_tag(tag: &str) -> bool
Returns a “proper” tag, i.e. starts with # always and is purely uppercase with no 0s or Os
pub fn fix_tag(tag: &str) -> String
Sourcepub fn random(max_high: u32) -> Self
pub fn random(max_high: u32) -> Self
Players have a max high of 100, clans/wars/messages seem to be much higher
pub fn to_tag(&self) -> String
Trait Implementations§
Source§impl<T> Ord for LogicLong<T>
impl<T> Ord for LogicLong<T>
1.21.0 · 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
Source§impl<T> PartialOrd for LogicLong<T>
impl<T> PartialOrd for LogicLong<T>
impl<T> Eq for LogicLong<T>
impl<T> StructuralPartialEq for LogicLong<T>
Auto Trait Implementations§
impl<T> Freeze for LogicLong<T>
impl<T> RefUnwindSafe for LogicLong<T>
impl<T> Send for LogicLong<T>
impl<T> Sync for LogicLong<T>
impl<T> Unpin for LogicLong<T>
impl<T> UnwindSafe for LogicLong<T>
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