pub struct ArkId(/* private fields */);Expand description
Identifier for an Ark server as used in addresses
Implementations§
Source§impl ArkId
impl ArkId
Sourcepub fn to_byte_array(self) -> [u8; 4]
pub fn to_byte_array(self) -> [u8; 4]
Convert into underlying byte array.
Sourcepub fn from_byte_array(bytes: [u8; 4]) -> Self
pub fn from_byte_array(bytes: [u8; 4]) -> Self
Convert from byte array.
Sourcepub fn from_slice(slice: &[u8]) -> Result<Self, TryFromSliceError>
pub fn from_slice(slice: &[u8]) -> Result<Self, TryFromSliceError>
Create from byte slice.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ArkId
impl<'de> Deserialize<'de> for ArkId
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<'a> DisplayHex for &'a ArkId
impl<'a> DisplayHex for &'a ArkId
Source§type Display = <&'a [u8; 4] as DisplayHex>::Display
type Display = <&'a [u8; 4] as DisplayHex>::Display
The type providing
fmt::Display implementation. Read moreSource§fn to_lower_hex_string(self) -> String
fn to_lower_hex_string(self) -> String
Create a lower-hex-encoded string. Read more
Source§fn to_upper_hex_string(self) -> String
fn to_upper_hex_string(self) -> String
Create an upper-hex-encoded string. Read more
Source§fn append_hex_to_string(self, case: Case, string: &mut String)
fn append_hex_to_string(self, case: Case, string: &mut String)
Appends hex-encoded content to an existing
String. Read moreSource§fn hex_reserve_suggestion(self) -> usize
fn hex_reserve_suggestion(self) -> usize
Hints how much bytes to reserve when creating a
String. Read moreSource§impl Ord for ArkId
impl Ord for ArkId
Source§impl PartialOrd for ArkId
impl PartialOrd for ArkId
impl Copy for ArkId
impl Eq for ArkId
impl StructuralPartialEq for ArkId
Auto Trait Implementations§
impl Freeze for ArkId
impl RefUnwindSafe for ArkId
impl Send for ArkId
impl Sync for ArkId
impl Unpin for ArkId
impl UnwindSafe for ArkId
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