pub struct ConnectionInfo { /* private fields */ }
Expand description
Implementations§
Source§impl ConnectionInfo
impl ConnectionInfo
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a default ConnectionInfo
Sourcepub fn set_wallet(&mut self, wallet: Wallet) -> &mut Self
pub fn set_wallet(&mut self, wallet: Wallet) -> &mut Self
Set the connected wallet
Sourcepub fn set_account(&mut self, account: WalletAccount) -> &mut Self
pub fn set_account(&mut self, account: WalletAccount) -> &mut Self
Set the connected account
Sourcepub async fn connect(
&mut self,
sender: WalletEventSender,
) -> WalletResult<WalletAccount>
pub async fn connect( &mut self, sender: WalletEventSender, ) -> WalletResult<WalletAccount>
Send a connect request to the browser wallet
Sourcepub async fn set_disconnected(&mut self, sender: WalletEventSender) -> &mut Self
pub async fn set_disconnected(&mut self, sender: WalletEventSender) -> &mut Self
Set the disconnected account
Sourcepub fn connected_wallet(&self) -> WalletResult<&Wallet>
pub fn connected_wallet(&self) -> WalletResult<&Wallet>
Get the connected wallet
Sourcepub fn connected_account(&self) -> WalletResult<&WalletAccount>
pub fn connected_account(&self) -> WalletResult<&WalletAccount>
Get the connected account
Sourcepub fn connected_wallet_raw(&self) -> Option<&Wallet>
pub fn connected_wallet_raw(&self) -> Option<&Wallet>
Get the connected wallet but return an Option to show the wallet exists instead of a WalletResult
Sourcepub fn connected_account_raw(&self) -> Option<&WalletAccount>
pub fn connected_account_raw(&self) -> Option<&WalletAccount>
Get the connected account but return an Option to show the account exists instead of a WalletResult
Sourcepub async fn emit_wallet_event(
&mut self,
wallet_name: &str,
account_processing: Option<WalletAccount>,
sender: WalletEventSender,
)
pub async fn emit_wallet_event( &mut self, wallet_name: &str, account_processing: Option<WalletAccount>, sender: WalletEventSender, )
Emit an event after processing the [standard:events].on
result
Trait Implementations§
Source§impl Clone for ConnectionInfo
impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
fn clone(&self) -> ConnectionInfo
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConnectionInfo
impl Debug for ConnectionInfo
Source§impl Default for ConnectionInfo
impl Default for ConnectionInfo
Source§fn default() -> ConnectionInfo
fn default() -> ConnectionInfo
Returns the “default value” for a type. Read more
Source§impl Ord for ConnectionInfo
impl Ord for ConnectionInfo
Source§fn cmp(&self, other: &ConnectionInfo) -> Ordering
fn cmp(&self, other: &ConnectionInfo) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ConnectionInfo
impl PartialEq for ConnectionInfo
Source§impl PartialOrd for ConnectionInfo
impl PartialOrd for ConnectionInfo
impl Eq for ConnectionInfo
impl StructuralPartialEq for ConnectionInfo
Auto Trait Implementations§
impl Freeze for ConnectionInfo
impl RefUnwindSafe for ConnectionInfo
impl !Send for ConnectionInfo
impl !Sync for ConnectionInfo
impl Unpin for ConnectionInfo
impl UnwindSafe for ConnectionInfo
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