pub struct SerialFormat {
pub category_divisor: u64,
pub has_weapon_info: bool,
pub extract_level: bool,
}Expand description
Serial format configuration
Defines how to parse a serial based on its type character.
Fields§
§category_divisor: u64Divisor to extract category from first VarBit (0 = use VarInt weapon info instead)
has_weapon_info: boolWhether first VarInt contains manufacturer+weapon type ID
extract_level: boolWhether to extract level from 4th header VarInt
Implementations§
Source§impl SerialFormat
impl SerialFormat
Sourcepub fn extract_category(&self, varbit: u64) -> Option<i64>
pub fn extract_category(&self, varbit: u64) -> Option<i64>
Extract category from VarBit value (returns None if this format doesn’t use VarBit categories)
Trait Implementations§
Source§impl Clone for SerialFormat
impl Clone for SerialFormat
Source§fn clone(&self) -> SerialFormat
fn clone(&self) -> SerialFormat
Returns a duplicate 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 SerialFormat
impl Debug for SerialFormat
impl Copy for SerialFormat
Auto Trait Implementations§
impl Freeze for SerialFormat
impl RefUnwindSafe for SerialFormat
impl Send for SerialFormat
impl Sync for SerialFormat
impl Unpin for SerialFormat
impl UnwindSafe for SerialFormat
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