pub struct DictionaryInfo {
pub lang: String,
pub is_installed: bool,
pub update_available: bool,
pub is_installing: bool,
}Expand description
Represents a single monolingual dictionary row in the Dictionaries settings category.
Each row shows a lang code as the label and “Installed” or “Download” as the
value. Installed dictionaries show a sub-menu with “Re-download” and “Delete”
options; uninstalled ones show an ActionLabel that fires the download event on tap.
When an update is available, the value shows “Update Available” and the submenu
includes an “Update” option above “Re-download”. When a download is in progress,
the value shows “Downloading” and no action widget is offered.
Fields§
§lang: StringISO 639-1 language code, e.g. "en" or "fr".
is_installed: boolWhether this dictionary is currently installed on the device.
update_available: boolWhether a newer version is available on the server.
is_installing: boolWhether a download/install is currently in progress for this language.
Trait Implementations§
Source§impl SettingKind for DictionaryInfo
impl SettingKind for DictionaryInfo
Source§fn identity(&self) -> SettingIdentity
fn identity(&self) -> SettingIdentity
SettingsEvent::UpdateValue to the
correct SettingValue view.Source§fn label(&self, _settings: &Settings) -> String
fn label(&self, _settings: &Settings) -> String
Source§fn handle(
&self,
evt: &Event,
_settings: &mut Settings,
_bus: &mut Bus,
) -> (Option<String>, bool)
fn handle( &self, evt: &Event, _settings: &mut Settings, _bus: &mut Bus, ) -> (Option<String>, bool)
Source§fn fetch(&self, _settings: &Settings) -> SettingData
fn fetch(&self, _settings: &Settings) -> SettingData
settings.Source§fn as_input_kind(&self) -> Option<&dyn InputSettingKind>
fn as_input_kind(&self) -> Option<&dyn InputSettingKind>
InputSettingKind if it supports text input. Read moreSource§fn file_chooser_entry_id(&self) -> Option<EntryId>
fn file_chooser_entry_id(&self) -> Option<EntryId>
Auto Trait Implementations§
impl Freeze for DictionaryInfo
impl RefUnwindSafe for DictionaryInfo
impl Send for DictionaryInfo
impl Sync for DictionaryInfo
impl Unpin for DictionaryInfo
impl UnsafeUnpin for DictionaryInfo
impl UnwindSafe for DictionaryInfo
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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