Struct epic_api::Owner [−][src]
pub struct Owner {
pub chain: Weak<Chain>,
pub peers: Weak<Peers>,
pub sync_state: Weak<SyncState>,
}
Expand description
Fields
chain: Weak<Chain>
peers: Weak<Peers>
sync_state: Weak<SyncState>
Implementations
Create a new API instance with the chain, transaction pool, peers and sync_state
. All subsequent
API calls will operate on this instance of node API.
Arguments
chain
- A non-owning reference of the chain.tx_pool
- A non-owning reference of the transaction pool.peers
- A non-owning reference of the peers.sync_state
- A non-owning reference of thesync_state
.
Returns
- An instance of the Node holding references to the current chain, transaction pool, peers and sync_state.
Retrieves a list of all connected peers.
Returns
- Result Containing:
- A vector of
PeerInfoDisplay
- or
Error
if an error is encountered.
Trait Implementations
Networked version of Owner::get_status. Read more
Networked version of Owner::validate_chain. Read more
Networked version of Owner::compact_chain. Read more
Networked version of Owner::get_peers. Read more
Networked version of Owner::get_connected_peers. Read more
Networked version of Owner::ban_peer. Read more
Networked version of Owner::unban_peer. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Owner
impl !UnwindSafe for Owner
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> SafeBorrow<T> for T where
T: ?Sized,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
pub fn borrow_replacement(ptr: &T) -> &T
pub fn borrow_replacement(ptr: &T) -> &T
Given ptr
, which was obtained from a prior call to Self::borrow()
,
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self
. Read more
type Output = T
type Output = T
Should always be Self