pub struct Rpc {
pub block_number: u64,
pub block_hash: Int,
/* private fields */
}Fields§
§block_number: u64§block_hash: IntImplementations§
Source§impl Rpc
impl Rpc
pub async fn latest(url: String) -> Result<Self>
pub async fn number(url: String, number: u64) -> Result<Self>
pub fn offline() -> Self
pub fn reset(&mut self, number: u64, hash: Int)
pub async fn chain_id(&self) -> Result<u64>
pub async fn lookup(&self, block: u64, index: u64) -> Result<TxFull>
pub async fn receipt(&self, hash: Int) -> Result<Receipt>
Trait Implementations§
Source§impl Chain for Rpc
impl Chain for Rpc
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
acc: &'life1 Acc,
key: &'life2 Int,
) -> Pin<Box<dyn Future<Output = Result<Int>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn acc<'life0, 'life1, 'async_trait>(
&'life0 self,
acc: &'life1 Acc,
) -> Pin<Box<dyn Future<Output = Result<Account>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn code<'life0, 'life1, 'async_trait>(
&'life0 self,
acc: &'life1 Acc,
) -> Pin<Box<dyn Future<Output = Result<(Buf, Int)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn nonce<'life0, 'life1, 'async_trait>(
&'life0 self,
acc: &'life1 Acc,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn balance<'life0, 'life1, 'async_trait>(
&'life0 self,
acc: &'life1 Acc,
) -> Pin<Box<dyn Future<Output = Result<Int>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn head<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<Head>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<Block>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn chain_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for Rpc
impl !UnwindSafe for Rpc
impl Freeze for Rpc
impl Send for Rpc
impl Sync for Rpc
impl Unpin for Rpc
impl UnsafeUnpin for Rpc
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