pub enum Region {
US,
EU,
CN,
KR,
TW,
SG,
}
Expand description
Supported regions for Ribbit endpoints
§Regional Availability
Some regions may have network restrictions:
CN
(China): Typically only accessible from within China- Other regions (
US
,EU
,KR
,TW
,SG
): Generally accessible globally
The client will timeout after 10 seconds if a region is unreachable.
§Example
use ribbit_client::Region;
let region = Region::US;
assert_eq!(region.hostname(), "us.version.battle.net");
assert_eq!(region.as_str(), "us");
// Parse from string
let parsed: Region = "eu".parse().unwrap();
assert_eq!(parsed, Region::EU);
Variants§
Implementations§
Trait Implementations§
impl Copy for Region
impl Eq for Region
impl StructuralPartialEq for Region
Auto Trait Implementations§
impl Freeze for Region
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnwindSafe for Region
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