Skip to main content

Services

Struct Services 

Source
pub struct Services {
Show 34 fields pub desktop: Option<Box<dyn DesktopService>>, 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§

§desktop: Option<Box<dyn DesktopService>>

O mouse fora das janelas, a janela sob um ponto, a transparência e a captura de um monitor (DesktopService).

§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§

§

impl !RefUnwindSafe for Services

§

impl !Send for Services

§

impl !Sync for Services

§

impl !UnwindSafe for Services

§

impl Forget for Services

§

impl Freeze for Services
where *const dyn DesktopService is !null: Freeze, PhantomData<dyn DesktopService>: Freeze, *const dyn WindowCaptureService is !null: Freeze, PhantomData<dyn WindowCaptureService>: Freeze, *const dyn OffscreenService is !null: Freeze, PhantomData<dyn OffscreenService>: Freeze, *const dyn WindowService is !null: Freeze, PhantomData<dyn WindowService>: Freeze, *const dyn TimerService is !null: Freeze, PhantomData<dyn TimerService>: Freeze, *const dyn ClipboardService is !null: Freeze, PhantomData<dyn ClipboardService>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const ArcInner<ImageData> is !null: Freeze, PhantomData<ArcInner<ImageData>>: Freeze, PhantomData<(String, Vec<u8>)>: Freeze, *const dyn CursorService is !null: Freeze, PhantomData<dyn CursorService>: Freeze, *const dyn ScreenService is !null: Freeze, PhantomData<dyn ScreenService>: Freeze, *const dyn TextInputService is !null: Freeze, PhantomData<dyn TextInputService>: Freeze, *const dyn LocaleService is !null: Freeze, PhantomData<dyn LocaleService>: Freeze, *const dyn TextService is !null: Freeze, PhantomData<dyn TextService>: Freeze, *const dyn ResourceService is !null: Freeze, PhantomData<dyn ResourceService>: Freeze, *const dyn FormFactory is !null: Freeze, PhantomData<dyn FormFactory>: Freeze, *const dyn FileDialogService is !null: Freeze, PhantomData<dyn FileDialogService>: Freeze, *const dyn PermissionService is !null: Freeze, PhantomData<dyn PermissionService>: Freeze, *const dyn BiometricService is !null: Freeze, PhantomData<dyn BiometricService>: Freeze, *const dyn HttpService is !null: Freeze, PhantomData<dyn HttpService>: Freeze, *const dyn NotificationService is !null: Freeze, PhantomData<dyn NotificationService>: Freeze, *const dyn LinkService is !null: Freeze, PhantomData<dyn LinkService>: Freeze, *const dyn SensorService is !null: Freeze, PhantomData<dyn SensorService>: Freeze, *const dyn BackgroundHost is !null: Freeze, PhantomData<dyn BackgroundHost>: Freeze, *const dyn PhoneService is !null: Freeze, PhantomData<dyn PhoneService>: Freeze, *const dyn GamepadService is !null: Freeze, PhantomData<dyn GamepadService>: Freeze, *const dyn PrintService is !null: Freeze, PhantomData<dyn PrintService>: Freeze, *const dyn PdfProvider is !null: Freeze, PhantomData<dyn PdfProvider>: Freeze, *const dyn TextAssist is !null: Freeze, PhantomData<dyn TextAssist>: Freeze, *const dyn NfcService is !null: Freeze, PhantomData<dyn NfcService>: Freeze, *const dyn BluetoothService is !null: Freeze, PhantomData<dyn BluetoothService>: Freeze, *const dyn PushService is !null: Freeze, PhantomData<dyn PushService>: Freeze, *const dyn MediaSessionService is !null: Freeze, PhantomData<dyn MediaSessionService>: Freeze, *const dyn ActionService is !null: Freeze, PhantomData<dyn ActionService>: Freeze, *const dyn OleService is !null: Freeze, PhantomData<dyn OleService>: Freeze, *const dyn WmiService is !null: Freeze, PhantomData<dyn WmiService>: Freeze,

§

impl Move for Services

§

impl Unpin for Services

§

impl UnsafeUnpin for Services
where *const dyn DesktopService is !null: UnsafeUnpin, PhantomData<dyn DesktopService>: UnsafeUnpin, *const dyn WindowCaptureService is !null: UnsafeUnpin, PhantomData<dyn WindowCaptureService>: UnsafeUnpin, *const dyn OffscreenService is !null: UnsafeUnpin, PhantomData<dyn OffscreenService>: UnsafeUnpin, *const dyn WindowService is !null: UnsafeUnpin, PhantomData<dyn WindowService>: UnsafeUnpin, *const dyn TimerService is !null: UnsafeUnpin, PhantomData<dyn TimerService>: UnsafeUnpin, *const dyn ClipboardService is !null: UnsafeUnpin, PhantomData<dyn ClipboardService>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const ArcInner<ImageData> is !null: UnsafeUnpin, PhantomData<ArcInner<ImageData>>: UnsafeUnpin, PhantomData<(String, Vec<u8>)>: UnsafeUnpin, *const dyn CursorService is !null: UnsafeUnpin, PhantomData<dyn CursorService>: UnsafeUnpin, *const dyn ScreenService is !null: UnsafeUnpin, PhantomData<dyn ScreenService>: UnsafeUnpin, *const dyn TextInputService is !null: UnsafeUnpin, PhantomData<dyn TextInputService>: UnsafeUnpin, *const dyn LocaleService is !null: UnsafeUnpin, PhantomData<dyn LocaleService>: UnsafeUnpin, *const dyn TextService is !null: UnsafeUnpin, PhantomData<dyn TextService>: UnsafeUnpin, *const dyn ResourceService is !null: UnsafeUnpin, PhantomData<dyn ResourceService>: UnsafeUnpin, *const dyn FormFactory is !null: UnsafeUnpin, PhantomData<dyn FormFactory>: UnsafeUnpin, *const dyn FileDialogService is !null: UnsafeUnpin, PhantomData<dyn FileDialogService>: UnsafeUnpin, *const dyn PermissionService is !null: UnsafeUnpin, PhantomData<dyn PermissionService>: UnsafeUnpin, *const dyn BiometricService is !null: UnsafeUnpin, PhantomData<dyn BiometricService>: UnsafeUnpin, *const dyn HttpService is !null: UnsafeUnpin, PhantomData<dyn HttpService>: UnsafeUnpin, *const dyn NotificationService is !null: UnsafeUnpin, PhantomData<dyn NotificationService>: UnsafeUnpin, *const dyn LinkService is !null: UnsafeUnpin, PhantomData<dyn LinkService>: UnsafeUnpin, *const dyn SensorService is !null: UnsafeUnpin, PhantomData<dyn SensorService>: UnsafeUnpin, *const dyn BackgroundHost is !null: UnsafeUnpin, PhantomData<dyn BackgroundHost>: UnsafeUnpin, *const dyn PhoneService is !null: UnsafeUnpin, PhantomData<dyn PhoneService>: UnsafeUnpin, *const dyn GamepadService is !null: UnsafeUnpin, PhantomData<dyn GamepadService>: UnsafeUnpin, *const dyn PrintService is !null: UnsafeUnpin, PhantomData<dyn PrintService>: UnsafeUnpin, *const dyn PdfProvider is !null: UnsafeUnpin, PhantomData<dyn PdfProvider>: UnsafeUnpin, *const dyn TextAssist is !null: UnsafeUnpin, PhantomData<dyn TextAssist>: UnsafeUnpin, *const dyn NfcService is !null: UnsafeUnpin, PhantomData<dyn NfcService>: UnsafeUnpin, *const dyn BluetoothService is !null: UnsafeUnpin, PhantomData<dyn BluetoothService>: UnsafeUnpin, *const dyn PushService is !null: UnsafeUnpin, PhantomData<dyn PushService>: UnsafeUnpin, *const dyn MediaSessionService is !null: UnsafeUnpin, PhantomData<dyn MediaSessionService>: UnsafeUnpin, *const dyn ActionService is !null: UnsafeUnpin, PhantomData<dyn ActionService>: UnsafeUnpin, *const dyn OleService is !null: UnsafeUnpin, PhantomData<dyn OleService>: UnsafeUnpin, *const dyn WmiService is !null: UnsafeUnpin, PhantomData<dyn WmiService>: UnsafeUnpin,

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.