pub struct BigTableConnection { /* private fields */ }Implementations§
Source§impl BigTableConnection
impl BigTableConnection
Sourcepub async fn new(
instance_name: &str,
app_profile_id: &str,
read_only: bool,
timeout: Option<Duration>,
credential_type: CredentialType,
) -> Result<Self>
pub async fn new( instance_name: &str, app_profile_id: &str, read_only: bool, timeout: Option<Duration>, credential_type: CredentialType, ) -> Result<Self>
Establish a connection to the BigTable instance named instance_name. If read-only access
is required, the read_only flag should be used to reduce the requested OAuth2 scope.
The GOOGLE_APPLICATION_CREDENTIALS environment variable will be used to determine the program name that contains the BigTable instance in addition to access credentials.
The BIGTABLE_EMULATOR_HOST environment variable is also respected.
The BIGTABLE_PROXY environment variable is used to configure the gRPC connection through a forward proxy (see HTTP_PROXY).
Sourcepub fn client(
&self,
) -> BigTable<impl FnMut(Request<()>) -> Result<Request<()>, Status>>
pub fn client( &self, ) -> BigTable<impl FnMut(Request<()>) -> Result<Request<()>, Status>>
Create a new BigTable client.
Clients require &mut self, due to Tonic::transport::Channel limitations, however
creating new clients is cheap and thus can be used as a work around for ease of use.
pub async fn put_bincode_cells_with_retry<T>(
&self,
table: &str,
cells: &[(RowKey, T)],
overwrite: bool,
) -> Result<usize>where
T: Serialize,
pub async fn delete_rows_with_retry( &self, table: &str, row_keys: &[RowKey], ) -> Result<()>
pub async fn get_bincode_cells_with_retry<T>(
&self,
table: &str,
row_keys: &[RowKey],
) -> Result<Vec<(RowKey, Result<T>)>>where
T: DeserializeOwned,
pub async fn put_protobuf_cells_with_retry<T>(
&self,
table: &str,
cells: &[(RowKey, T)],
overwrite: bool,
) -> Result<usize>where
T: Message,
Trait Implementations§
Source§impl Clone for BigTableConnection
impl Clone for BigTableConnection
Source§fn clone(&self) -> BigTableConnection
fn clone(&self) -> BigTableConnection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for BigTableConnection
impl !UnwindSafe for BigTableConnection
impl Freeze for BigTableConnection
impl Send for BigTableConnection
impl Sync for BigTableConnection
impl Unpin for BigTableConnection
impl UnsafeUnpin for BigTableConnection
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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