Skip to main content

Services

Struct Services 

Source
pub struct Services {
Show 33 fields pub window_capture: Option<Box<dyn WindowCaptureService>>, pub offscreen: Option<Box<dyn OffscreenService>>, pub window: Option<Box<dyn WindowService>>, pub timer: Option<Box<dyn TimerService>>, pub clipboard: Option<Box<dyn ClipboardService>>, pub clipboard_local: LocalClipboard, pub cursor: Option<Box<dyn CursorService>>, pub screen: Option<Box<dyn ScreenService>>, pub text_input: Option<Box<dyn TextInputService>>, pub locale: Option<Box<dyn LocaleService>>, pub text: Option<Box<dyn TextService>>, pub resources: Option<Box<dyn ResourceService>>, pub forms: Option<Box<dyn FormFactory>>, pub file_dialogs: Option<Box<dyn FileDialogService>>, pub permissions: Option<Box<dyn PermissionService>>, pub biometrics: Option<Box<dyn BiometricService>>, pub http: Option<Box<dyn HttpService>>, pub notifications: Option<Box<dyn NotificationService>>, pub links: Option<Box<dyn LinkService>>, pub sensors: Option<Box<dyn SensorService>>, pub background: Option<Box<dyn BackgroundHost>>, pub phone: Option<Box<dyn PhoneService>>, pub gamepads: Option<Box<dyn GamepadService>>, pub printer: Option<Box<dyn PrintService>>, pub pdf: Option<Box<dyn PdfProvider>>, pub text_assist: Option<Box<dyn TextAssist>>, pub nfc: Option<Box<dyn NfcService>>, pub bluetooth: Option<Box<dyn BluetoothService>>, pub push: Option<Box<dyn PushService>>, pub media_session: Option<Box<dyn MediaSessionService>>, pub actions: Option<Box<dyn ActionService>>, pub ole: Option<Box<dyn OleService>>, pub wmi: Option<Box<dyn WmiService>>,
}
Expand description

Conjunto de serviços fornecidos pela plataforma. Todos são opcionais.

Fields§

§window_capture: Option<Box<dyn WindowCaptureService>>

A captura da janela (a foto com o WebView).

§offscreen: Option<Box<dyn OffscreenService>>§window: Option<Box<dyn WindowService>>§timer: Option<Box<dyn TimerService>>§clipboard: Option<Box<dyn ClipboardService>>§clipboard_local: LocalClipboard

O que foi copiado por último, para o que a plataforma não guarda (crate::clipboard).

§cursor: Option<Box<dyn CursorService>>§screen: Option<Box<dyn ScreenService>>§text_input: Option<Box<dyn TextInputService>>§locale: Option<Box<dyn LocaleService>>§text: Option<Box<dyn TextService>>§resources: Option<Box<dyn ResourceService>>§forms: Option<Box<dyn FormFactory>>§file_dialogs: Option<Box<dyn FileDialogService>>§permissions: Option<Box<dyn PermissionService>>

Consultar e pedir permissões (câmera, localização…): o componente Permissions.

§biometrics: Option<Box<dyn BiometricService>>

Digital, rosto, Windows Hello: o componente Biometrics.

§http: Option<Box<dyn HttpService>>§notifications: Option<Box<dyn NotificationService>>§links: Option<Box<dyn LinkService>>

Abrir endereços e apps, compartilhar: o componente AppLink.

§sensors: Option<Box<dyn SensorService>>

Localização, bateria, rede, movimento, bússola, proximidade, luz e vibração.

§background: Option<Box<dyn BackgroundHost>>

O serviço em primeiro plano (o BackgroundService); sem ele, a lógica roda enquanto o app roda.

§phone: Option<Box<dyn PhoneService>>

Ligações e tela de bloqueio (Phone, LockScreen).

§gamepads: Option<Box<dyn GamepadService>>

Controles de jogo (Gamepad).

§printer: Option<Box<dyn PrintService>>§pdf: Option<Box<dyn PdfProvider>>

O PDF padrão (o Report sem provedor ligado, a impressão fora do Windows): o aylis-providers põe o dele ao registrar as classes. Sem ele, exportar PDF é um erro.

§text_assist: Option<Box<dyn TextAssist>>

Correção e sugestão de texto dos campos (spellcheck, autocomplete): o motor nativo da plataforma, ou outro que o app ponha no lugar (crate::textassist).

§nfc: Option<Box<dyn NfcService>>

Tags NFC (Nfc).

§bluetooth: Option<Box<dyn BluetoothService>>

Bluetooth BLE e clássico (Bluetooth).

§push: Option<Box<dyn PushService>>

Notificações push (PushNotifications): FCM, APNs, Web Push, WNS, UnifiedPush.

§media_session: Option<Box<dyn MediaSessionService>>

Os controles de mídia do sistema (MediaSession): o SMTC do Windows, o MPRIS do Linux, o Media Session do navegador, o MPNowPlayingInfoCenter do macOS e do iOS.

§actions: Option<Box<dyn ActionService>>

As ações do aparelho (WakeAppAction, NotifyAction) e as regras do PushTrigger executadas pela plataforma, também com o app fechado. Sem ele, os componentes fazem o que dá com o app aberto (mostrar o form, a notificação comum).

§ole: Option<Box<dyn OleService>>

Automação OLE dos programas instalados (o OleObject): só no Windows.

§wmi: Option<Box<dyn WmiService>>

O WMI do Windows (o WmiQuery): consultas e eventos do sistema.

Trait Implementations§

Source§

impl Default for Services

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.