pub struct Client { /* private fields */ }Expand description
An asynchronous Cloud Spanner client.
Implementations§
Source§impl 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.
Source§impl 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 Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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 moreSource§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::RequestSource§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