Struct spanner_rs::Client
source · [−]pub struct Client { /* private fields */ }
Expand description
An asynchronous Cloud Spanner client.
Implementations
sourceimpl Client
impl Client
sourcepub fn configure() -> ConfigBuilder
pub fn configure() -> ConfigBuilder
Returns a new ConfigBuilder
which can be used to configure how to connect to a Cloud Spanner instance and database.
sourceimpl Client
impl Client
sourcepub fn read_only(&self) -> impl ReadContext
pub fn read_only(&self) -> impl ReadContext
Returns a ReadContext
that can be used to read data out of Cloud Spanner.
The returned context uses TimestampBound::Strong
consistency for each individual read.
sourcepub fn read_only_with_bound(&self, bound: TimestampBound) -> impl ReadContext
pub fn read_only_with_bound(&self, bound: TimestampBound) -> impl ReadContext
Returns a ReadContext
that can be used to read data out of Cloud Spanner.
The returned context uses the specified bounded consistency for each individual read.
sourcepub fn read_write(&self) -> TxRunner
pub fn read_write(&self) -> TxRunner
Returns a TxRunner
that can be used to execute transactions using a TransactionContext
to read and write data from/into Cloud Spanner.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request