pub struct LocalPeer { /* private fields */ }Expand description
A fluent client backed by the in-process peer library.
Implementations§
Source§impl LocalPeer
impl LocalPeer
Sourcepub async fn connect(config: ConnectConfig) -> Result<Self, ClientError>
pub async fn connect(config: ConnectConfig) -> Result<Self, ClientError>
Connects a peer to a transactor and wraps it in the fluent API.
§Errors
Returns ClientError when no endpoint accepts the subscription.
Sourcepub fn from_connection(connection: Arc<Connection>) -> Self
pub fn from_connection(connection: Arc<Connection>) -> Self
Wraps an already-established peer connection.
Sourcepub fn connection(&self) -> &Arc<Connection>
pub fn connection(&self) -> &Arc<Connection>
The underlying peer connection, for peer-library operations the fluent API does not surface (tx-report streaming, index policy, and so on).
Trait Implementations§
Source§impl Peer for LocalPeer
impl Peer for LocalPeer
Source§fn db<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Db, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn db<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Db, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The current database value. Read more
Source§fn transact<'life0, 'async_trait>(
&'life0 self,
tx: TxData,
) -> Pin<Box<dyn Future<Output = Result<TxReport, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transact<'life0, 'async_trait>(
&'life0 self,
tx: TxData,
) -> Pin<Box<dyn Future<Output = Result<TxReport, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submits a transaction and waits until it is applied, returning a
report whose
db_after observes it. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for LocalPeer
impl !UnwindSafe for LocalPeer
impl Freeze for LocalPeer
impl Send for LocalPeer
impl Sync for LocalPeer
impl Unpin for LocalPeer
impl UnsafeUnpin for LocalPeer
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request