pub struct BobClient { /* private fields */ }Expand description
BOB Layer 2 client
Implementations§
Trait Implementations§
Source§impl Layer2Protocol for BobClient
impl Layer2Protocol for BobClient
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ProtocolState, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_transaction_status<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatus, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sync_state<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn issue_asset<'life0, 'async_trait>(
&'life0 self,
params: AssetParams,
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transfer_asset<'life0, 'async_trait>(
&'life0 self,
transfer: AssetTransfer,
) -> Pin<Box<dyn Future<Output = Result<TransferResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify_proof<'life0, 'async_trait>(
&'life0 self,
proof: Proof,
) -> Pin<Box<dyn Future<Output = Result<VerificationResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_state<'life0, 'life1, 'async_trait>(
&'life0 self,
state_data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<ValidationResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Layer2ProtocolTrait for BobClient
impl Layer2ProtocolTrait for BobClient
Source§fn get_state(&self) -> Result<ProtocolState, Box<dyn Error + Send + Sync>>
fn get_state(&self) -> Result<ProtocolState, Box<dyn Error + Send + Sync>>
Get the current state of the protocol
Source§fn submit_transaction(
&self,
tx_data: &[u8],
) -> Result<String, Box<dyn Error + Send + Sync>>
fn submit_transaction( &self, tx_data: &[u8], ) -> Result<String, Box<dyn Error + Send + Sync>>
Submit a transaction to BOB
Source§fn check_transaction_status(
&self,
tx_id: &str,
) -> Result<TransactionStatus, Box<dyn Error + Send + Sync>>
fn check_transaction_status( &self, tx_id: &str, ) -> Result<TransactionStatus, Box<dyn Error + Send + Sync>>
Check transaction status
Source§fn sync_state(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
fn sync_state(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
Synchronize state with BOB network
Source§fn issue_asset(
&self,
params: AssetParams,
) -> Result<String, Box<dyn Error + Send + Sync>>
fn issue_asset( &self, params: AssetParams, ) -> Result<String, Box<dyn Error + Send + Sync>>
Issue an asset on BOB
Source§fn transfer_asset(
&self,
transfer: AssetTransfer,
) -> Result<TransferResult, Box<dyn Error + Send + Sync>>
fn transfer_asset( &self, transfer: AssetTransfer, ) -> Result<TransferResult, Box<dyn Error + Send + Sync>>
Transfer an asset on BOB
Source§fn verify_proof(
&self,
proof: Proof,
) -> Result<VerificationResult, Box<dyn Error + Send + Sync>>
fn verify_proof( &self, proof: Proof, ) -> Result<VerificationResult, Box<dyn Error + Send + Sync>>
Verify a proof on BOB
Source§fn validate_state(
&self,
state_data: &[u8],
) -> Result<ValidationResult, Box<dyn Error + Send + Sync>>
fn validate_state( &self, state_data: &[u8], ) -> Result<ValidationResult, Box<dyn Error + Send + Sync>>
Validate state on BOB
Auto Trait Implementations§
impl Freeze for BobClient
impl RefUnwindSafe for BobClient
impl Send for BobClient
impl Sync for BobClient
impl Unpin for BobClient
impl UnwindSafe for BobClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more