Struct matrix_sdk::widget::WidgetDriver
source · pub struct WidgetDriver { /* private fields */ }
Available on crate feature
experimental-widgets
only.Expand description
An object that handles all interactions of a widget living inside a webview or iframe with the Matrix world.
Implementations§
source§impl WidgetDriver
impl WidgetDriver
sourcepub fn new(settings: WidgetSettings) -> (Self, WidgetDriverHandle)
pub fn new(settings: WidgetSettings) -> (Self, WidgetDriverHandle)
Creates a new WidgetDriver
and a corresponding set of channels to let
the widget (inside a webview or iframe) communicate with it.
sourcepub async fn run(
self,
room: Room,
capabilities_provider: impl CapabilitiesProvider
) -> Result<(), ()>
pub async fn run( self, room: Room, capabilities_provider: impl CapabilitiesProvider ) -> Result<(), ()>
Starts a client widget API state machine for a given widget
in a given
joined room
. The function returns once the widget is disconnected or
any terminal error occurs.
Not implemented yet! Currently, it does not contain any useful functionality, it only blindly forwards the messages and returns errors once a non-implemented part is triggered.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for WidgetDriver
impl Send for WidgetDriver
impl Sync for WidgetDriver
impl !Unpin for WidgetDriver
impl UnwindSafe for WidgetDriver
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
Mutably borrows from an owned value. Read more
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§fn clone_handle(handle: Handle) -> Handle
fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>