pub struct SpannerDatabase { /* private fields */ }Expand description
A configured, but not yet connected, Spanner database.
Holds the connection parameters (the database path and, optionally, an emulator endpoint) and
mints SpannerConnections from them.
Trait Implementations§
Source§impl Database for SpannerDatabase
impl Database for SpannerDatabase
type ConnectionType = SpannerConnection
Source§fn new_connection(&self) -> Result<Self::ConnectionType>
fn new_connection(&self) -> Result<Self::ConnectionType>
Allocate and initialize a new connection without pre-init options.
Source§fn new_connection_with_opts(
&self,
opts: impl IntoIterator<Item = (OptionConnection, OptionValue)>,
) -> Result<Self::ConnectionType>
fn new_connection_with_opts( &self, opts: impl IntoIterator<Item = (OptionConnection, OptionValue)>, ) -> Result<Self::ConnectionType>
Allocate and initialize a new connection with pre-init options.
Source§impl Optionable for SpannerDatabase
impl Optionable for SpannerDatabase
type Option = OptionDatabase
Source§fn set_option(&mut self, key: Self::Option, value: OptionValue) -> Result<()>
fn set_option(&mut self, key: Self::Option, value: OptionValue) -> Result<()>
Set a post-init option.
Source§fn get_option_string(&self, key: Self::Option) -> Result<String>
fn get_option_string(&self, key: Self::Option) -> Result<String>
Get a string option value by key.
Source§fn get_option_bytes(&self, key: Self::Option) -> Result<Vec<u8>>
fn get_option_bytes(&self, key: Self::Option) -> Result<Vec<u8>>
Get a bytes option value by key.
Auto Trait Implementations§
impl Freeze for SpannerDatabase
impl RefUnwindSafe for SpannerDatabase
impl Send for SpannerDatabase
impl Sync for SpannerDatabase
impl Unpin for SpannerDatabase
impl UnsafeUnpin for SpannerDatabase
impl UnwindSafe for SpannerDatabase
Blanket Implementations§
impl<T> Allocation for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<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> 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