pub struct InitEvents<'a> { /* private fields */ }
Expand description
Used to initialize the Register
and AppReady
events to the browser window
Implementations§
Source§impl<'a> InitEvents<'a>
impl<'a> InitEvents<'a>
Sourcepub fn new(window: &'a Window) -> Self
pub fn new(window: &'a Window) -> Self
Instantiate InitEvents
Sourcepub fn init(&self, adapter: &mut WalletAdapter) -> WalletResult<()>
pub fn init(&self, adapter: &mut WalletAdapter) -> WalletResult<()>
Register events by providing a crate::WalletStorage that is used to store all registered wallets
Sourcepub fn dispatch_app_event(&self, storage: StorageType)
pub fn dispatch_app_event(&self, storage: StorageType)
An App Ready event registered to the browser window
Sourcepub fn register_wallet_event(&self, storage: StorageType) -> WalletResult<()>
pub fn register_wallet_event(&self, storage: StorageType) -> WalletResult<()>
The register wallet event registered to the browser window
Sourcepub fn register_object(storage: StorageType) -> Object
pub fn register_object(storage: StorageType) -> Object
Sets the object to be passed to the register function
Trait Implementations§
Source§impl<'a> Debug for InitEvents<'a>
impl<'a> Debug for InitEvents<'a>
Source§impl<'a> PartialEq for InitEvents<'a>
impl<'a> PartialEq for InitEvents<'a>
impl<'a> Eq for InitEvents<'a>
impl<'a> StructuralPartialEq for InitEvents<'a>
Auto Trait Implementations§
impl<'a> Freeze for InitEvents<'a>
impl<'a> RefUnwindSafe for InitEvents<'a>
impl<'a> !Send for InitEvents<'a>
impl<'a> !Sync for InitEvents<'a>
impl<'a> Unpin for InitEvents<'a>
impl<'a> UnwindSafe for InitEvents<'a>
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