Skip to main content

provides

Macro provides 

macro_rules! provides {
    (@each [$($(#[$attribute:meta])* $capability:ty),+] { $($field:ident)? }) => { ... };
    ($($(#[$attribute:meta])* $capability:ty),+ $(,)?) => { ... };
    ($($(#[$attribute:meta])* $capability:ty),+ ; inner = $field:ident) => { ... };
}
Expand description

Declare the capabilities a widget provides, inside its impl Widget: provides!(dyn FullscreenProvider, dyn Continuable);

A wrapper that provides some capabilities itself and passes every other request to the widget in one of its fields names that field: provides!(dyn CommittedActions; inner = content);

Capabilities may carry conditional compilation attributes, so a platform-only implementation need not be compiled or advertised on other targets: provides!(#[cfg(not(target_family = "wasm"))] dyn NativeCapability);