pub struct Locale { /* private fields */ }Expand description
Locale
Implementations§
Source§impl Locale
impl Locale
Sourcepub async fn graphql_ietf(
&self,
_: &Context<'_>,
) -> Result<&'static [&'static str]>
Available on crate features async-graphql and alloc only.
pub async fn graphql_ietf( &self, _: &Context<'_>, ) -> Result<&'static [&'static str]>
async-graphql and alloc only.Returns the IETF locale code (e.g. en-US)
Sourcepub async fn graphql_timezones(
&self,
_: &Context<'_>,
) -> Result<&'static [&'static Timezone]>
Available on crate features async-graphql and alloc only.
pub async fn graphql_timezones( &self, _: &Context<'_>, ) -> Result<&'static [&'static Timezone]>
async-graphql and alloc only.Returns the list of tz database timezones
Sourcepub async fn graphql_date_formats(
&self,
_: &Context<'_>,
) -> Result<&'static StaticMap<&'static str, &'static str>>
Available on crate features async-graphql and alloc only.
pub async fn graphql_date_formats( &self, _: &Context<'_>, ) -> Result<&'static StaticMap<&'static str, &'static str>>
async-graphql and alloc only.Returns date formats for each IETF locale.
- Key is the IETF code
- Value is the date format, where:
G= eray= yearM= monthd= day
Sourcepub async fn graphql_measurement_system(
&self,
_: &Context<'_>,
) -> Result<MeasurementSystem>
Available on crate features async-graphql and alloc only.
pub async fn graphql_measurement_system( &self, _: &Context<'_>, ) -> Result<MeasurementSystem>
async-graphql and alloc only.Returns system of measurement in use. see MeasurementSystem
Sourcepub async fn graphql_hour_clock(&self, _: &Context<'_>) -> Result<HourClock>
Available on crate features async-graphql and alloc only.
pub async fn graphql_hour_clock(&self, _: &Context<'_>) -> Result<HourClock>
async-graphql and alloc only.Returns the type of clock used. see HourClock
Sourcepub async fn graphql_driving_side(&self, _: &Context<'_>) -> Result<DrivingSide>
Available on crate features async-graphql and alloc only.
pub async fn graphql_driving_side(&self, _: &Context<'_>) -> Result<DrivingSide>
async-graphql and alloc only.Returns the side of the road traffic drives on. see DrivingSide
Sourcepub async fn graphql_distance_unit(
&self,
_: &Context<'_>,
) -> Result<DistanceUint>
Available on crate features async-graphql and alloc only.
pub async fn graphql_distance_unit( &self, _: &Context<'_>, ) -> Result<DistanceUint>
async-graphql and alloc only.Returns the unit of distance used (kilometer or mile). see DistanceUint
Sourcepub async fn graphql_temperature_unit(
&self,
_: &Context<'_>,
) -> Result<TemperatureUint>
Available on crate features async-graphql and alloc only.
pub async fn graphql_temperature_unit( &self, _: &Context<'_>, ) -> Result<TemperatureUint>
async-graphql and alloc only.Returns the unit of temperature (celsius or fahrenheit). see TemperatureUint
Source§impl Locale
impl Locale
Sourcepub const fn timezones(&self) -> &'static [&'static Timezone]
pub const fn timezones(&self) -> &'static [&'static Timezone]
Returns the list of tz database timezones
Sourcepub const fn date_formats(
&self,
) -> &'static StaticMap<&'static str, &'static str>
pub const fn date_formats( &self, ) -> &'static StaticMap<&'static str, &'static str>
Returns date formats for each IETF locale.
- Key is the IETF code
- Value is the date format, where:
G= eray= yearM= monthd= day
Sourcepub const fn measurement_system(&self) -> MeasurementSystem
pub const fn measurement_system(&self) -> MeasurementSystem
Returns system of measurement in use. see MeasurementSystem
Sourcepub const fn hour_clock(&self) -> HourClock
pub const fn hour_clock(&self) -> HourClock
Returns the type of clock used. see HourClock
Sourcepub const fn driving_side(&self) -> DrivingSide
pub const fn driving_side(&self) -> DrivingSide
Returns the side of the road traffic drives on. see DrivingSide
Sourcepub const fn distance_unit(&self) -> DistanceUint
pub const fn distance_unit(&self) -> DistanceUint
Returns the unit of distance used (kilometer or mile). see DistanceUint
Sourcepub const fn temperature_unit(&self) -> TemperatureUint
pub const fn temperature_unit(&self) -> TemperatureUint
Returns the unit of temperature (celsius or fahrenheit). see TemperatureUint
Sourcepub const fn week_start_on(&self) -> Day
pub const fn week_start_on(&self) -> Day
Returns which day is the first day of the week on the calendar. see Day
Trait Implementations§
Source§impl ContainerType for Locale
Available on crate features async-graphql and alloc only.
impl ContainerType for Locale
async-graphql and alloc only.Source§fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
async_graphql::Value. Read moreSource§fn find_entity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>,
params: &'life3 Value,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn find_entity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>,
params: &'life3 Value,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn collect_all_fields<'a>(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>,
) -> Result<(), ServerError>
fn collect_all_fields<'a>( &'a self, ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>, fields: &mut Fields<'a>, ) -> Result<(), ServerError>
Source§impl Ord for Locale
impl Ord for Locale
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl OutputType for Locale
Available on crate features async-graphql and alloc only.
impl OutputType for Locale
async-graphql and alloc only.Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Source§fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>,
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>,
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
async_graphql::Value.Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Source§impl PartialOrd for Locale
impl PartialOrd for Locale
impl Copy for Locale
impl Eq for Locale
impl ObjectType for Locale
async-graphql and alloc only.impl StructuralPartialEq for Locale
Auto Trait Implementations§
impl Freeze for Locale
impl RefUnwindSafe for Locale
impl Send for Locale
impl Sync for Locale
impl Unpin for Locale
impl UnsafeUnpin for Locale
impl UnwindSafe for Locale
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.