pub struct StellarClient<T: Send + Sync + Clone> { /* private fields */ }
Expand description
Client implementation for the Stellar blockchain
Provides high-level access to Stellar blockchain data and operations through HTTP transport.
Implementations§
Source§impl<T: Send + Sync + Clone> StellarClient<T>
impl<T: Send + Sync + Clone> StellarClient<T>
Sourcepub fn new_with_transport(http_client: T) -> Self
pub fn new_with_transport(http_client: T) -> Self
Creates a new Stellar client instance with a specific transport client
Trait Implementations§
Source§impl<T: Send + Sync + Clone + BlockchainTransport> BlockChainClient for StellarClient<T>
impl<T: Send + Sync + Clone + BlockchainTransport> BlockChainClient for StellarClient<T>
Source§fn get_latest_block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the latest block number with retry functionality
Source§fn get_blocks<'life0, 'async_trait>(
&'life0 self,
start_block: u64,
end_block: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockType>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_blocks<'life0, 'async_trait>(
&'life0 self,
start_block: u64,
end_block: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockType>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl<T: Send + Sync + Clone + BlockchainTransport> BlockFilterFactory<StellarClient<T>> for StellarClient<T>
impl<T: Send + Sync + Clone + BlockchainTransport> BlockFilterFactory<StellarClient<T>> for StellarClient<T>
type Filter = StellarBlockFilter<StellarClient<T>>
fn filter() -> Self::Filter
Source§impl<T: Clone + Send + Sync + Clone> Clone for StellarClient<T>
impl<T: Clone + Send + Sync + Clone> Clone for StellarClient<T>
Source§fn clone(&self) -> StellarClient<T>
fn clone(&self) -> StellarClient<T>
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<T: Send + Sync + Clone + BlockchainTransport> StellarClientTrait for StellarClient<T>
impl<T: Send + Sync + Clone + BlockchainTransport> StellarClientTrait for StellarClient<T>
Source§fn get_transactions<'life0, 'async_trait>(
&'life0 self,
start_sequence: u32,
end_sequence: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StellarTransaction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transactions<'life0, 'async_trait>(
&'life0 self,
start_sequence: u32,
end_sequence: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StellarTransaction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves transactions within a sequence range with pagination
§Errors
- Returns
anyhow::Error
if start_sequence > end_sequence - Returns
anyhow::Error
if transaction parsing fails
Source§fn get_events<'life0, 'async_trait>(
&'life0 self,
start_sequence: u32,
end_sequence: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StellarEvent>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_events<'life0, 'async_trait>(
&'life0 self,
start_sequence: u32,
end_sequence: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StellarEvent>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves events within a sequence range with pagination
§Errors
- Returns
anyhow::Error
if start_sequence > end_sequence - Returns
anyhow::Error
if event parsing fails
Auto Trait Implementations§
impl<T> Freeze for StellarClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for StellarClient<T>where
T: RefUnwindSafe,
impl<T> Send for StellarClient<T>
impl<T> Sync for StellarClient<T>
impl<T> Unpin for StellarClient<T>where
T: Unpin,
impl<T> UnwindSafe for StellarClient<T>where
T: UnwindSafe,
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
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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