pub enum Region {
Show 28 variants
Argentina,
Australia,
Brazil,
Canada,
China,
Denmark,
Finland,
France,
Germany,
Greece,
HongKong,
India,
Israel,
Italy,
Malaysia,
NewZealand,
Norway,
Portugal,
Russia,
Singapore,
Spain,
Sweden,
Taiwan,
Thailand,
Turkey,
UnitedKingdom,
UnitedStates,
Vietnam,
}Expand description
Supported regions for Yahoo Finance regional APIs
Each region has predefined language and region codes that work together. Using the Region enum ensures correct lang/region pairing.
Variants§
Argentina
Argentina (es-AR, AR)
Australia
Australia (en-AU, AU)
Brazil
Brazil (pt-BR, BR)
Canada
Canada (en-CA, CA)
China
China (zh-CN, CN)
Denmark
Denmark (da-DK, DK)
Finland
Finland (fi-FI, FI)
France
France (fr-FR, FR)
Germany
Germany (de-DE, DE)
Greece
Greece (el-GR, GR)
HongKong
Hong Kong (zh-Hant-HK, HK)
India
India (en-IN, IN)
Israel
Israel (he-IL, IL)
Italy
Italy (it-IT, IT)
Malaysia
Malaysia (ms-MY, MY)
NewZealand
New Zealand (en-NZ, NZ)
Norway
Norway (nb-NO, NO)
Portugal
Portugal (pt-PT, PT)
Russia
Russia (ru-RU, RU)
Singapore
Singapore (en-SG, SG)
Spain
Spain (es-ES, ES)
Sweden
Sweden (sv-SE, SE)
Taiwan
Taiwan (zh-TW, TW)
Thailand
Thailand (th-TH, TH)
Turkey
Turkey (tr-TR, TR)
UnitedKingdom
United Kingdom (en-GB, GB)
UnitedStates
United States (en-US, US) - Default
Vietnam
Vietnam (vi-VN, VN)
Implementations§
Source§impl Region
impl Region
Sourcepub fn lang(&self) -> &'static str
pub fn lang(&self) -> &'static str
Get the language code for this region
§Example
use finance_query::Region;
assert_eq!(Region::France.lang(), "fr-FR");
assert_eq!(Region::UnitedStates.lang(), "en-US");Sourcepub fn region(&self) -> &'static str
pub fn region(&self) -> &'static str
Get the region code for this region
§Example
use finance_query::Region;
assert_eq!(Region::France.region(), "FR");
assert_eq!(Region::UnitedStates.region(), "US");Sourcepub fn cors_domain(&self) -> &'static str
pub fn cors_domain(&self) -> &'static str
Get the CORS domain for this region
§Example
use finance_query::Region;
assert_eq!(Region::UnitedStates.cors_domain(), "finance.yahoo.com");
assert_eq!(Region::France.cors_domain(), "fr.finance.yahoo.com");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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more