pub enum Region {
USEast,
USWest,
SouthAmerica,
Europe,
Asia,
Australia,
MiddleEast,
Africa,
All,
}
Expand description
Region enum to restrict the servers region the query searches for
- Intended to be used with:
MSQClient
andMSQClientBlock
Reference
Region Enum | Region | Byte |
---|---|---|
Region::USEast | US East coast | 0x00 |
Region::USWest | US West coast | 0x01 |
Region::SouthAmerica | South America | 0x02 |
Region::Europe | Europe | 0x03 |
Region::Asia | Asia | 0x04 |
Region::Australia | Australia | 0x05 |
Region::MiddleEast | Middle East | 0x06 |
Region::Africa | Africa | 0x07 |
Region::All | Rest of the world | 0xFF |
Variants
USEast
USWest
SouthAmerica
Europe
Asia
Australia
MiddleEast
Africa
All
Implementations
sourceimpl Region
impl Region
sourcepub fn as_u8(&self) -> u8
pub fn as_u8(&self) -> u8
Return raw u8 byte code of its specified region
Example
use msq::Region;
let region_hex_str = format!("{:#04x}", Region::All.as_u8());
assert_eq!(®ion_hex_str, "0xff");
let region_hex_str = format!("{:#04x}", Region::Europe.as_u8());
assert_eq!(®ion_hex_str, "0x03");
pub fn from_u8(code: u8) -> Result<Self>
Trait Implementations
impl StructuralPartialEq for Region
Auto Trait Implementations
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnwindSafe for Region
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more