pub struct WriterBuilder { /* private fields */ }Expand description
A builder to create a stream writer
Implementations§
Source§impl WriterBuilder
impl WriterBuilder
Sourcepub fn default<T: Into<String>>(self, table: T) -> Result<DefaultWriter>
pub fn default<T: Into<String>>(self, table: T) -> Result<DefaultWriter>
Create a writer for the default stream for the given table.
§Example
let writer = client
.arrow(schema())
.default("projects/my-project/datasets/my-dataset/tables/my-table")?;
use google_cloud_bigquery::model::ArrowSchema;
fn schema() -> ArrowSchema {
todo!("Define your table's schema...")
}Sourcepub async fn pending<T: Into<String>>(self, table: T) -> Result<PendingWriter>
pub async fn pending<T: Into<String>>(self, table: T) -> Result<PendingWriter>
Creates a pending writer for the given table.
§Example
let writer = client
.arrow(schema())
.pending("projects/my-project/datasets/my-dataset/tables/my-table")
.await?;
use google_cloud_bigquery::model::ArrowSchema;
fn schema() -> ArrowSchema {
todo!("Define your table's schema...")
}Sourcepub async fn committed<T: Into<String>>(
self,
table: T,
) -> Result<CommittedWriter>
pub async fn committed<T: Into<String>>( self, table: T, ) -> Result<CommittedWriter>
Creates a committed writer for the given table.
§Example
let writer = client
.arrow(schema())
.committed("projects/my-project/datasets/my-dataset/tables/my-table")
.await?;
use google_cloud_bigquery::model::ArrowSchema;
fn schema() -> ArrowSchema {
todo!("Define your table's schema...")
}Sourcepub async fn buffered<T: Into<String>>(self, table: T) -> Result<BufferedWriter>
pub async fn buffered<T: Into<String>>(self, table: T) -> Result<BufferedWriter>
Creates a buffered writer for the given table.
§Example
let writer = client
.arrow(schema())
.buffered("projects/my-project/datasets/my-dataset/tables/my-table")
.await?;
use google_cloud_bigquery::model::ArrowSchema;
fn schema() -> ArrowSchema {
todo!("Define your table's schema...")
}Sourcepub async fn attach<U: Writer, S: Into<String>>(
self,
write_stream: S,
) -> Result<U, AttachError>
pub async fn attach<U: Writer, S: Into<String>>( self, write_stream: S, ) -> Result<U, AttachError>
Attaches the builder to an existing stream.
§Example
use google_cloud_bigquery::write::arrow::CommittedWriter;
let writer: CommittedWriter = client
.arrow(schema())
.attach("projects/my-project/datasets/my_dataset/tables/my_table/streams/my_stream")
.await?;Trait Implementations§
Source§impl Clone for WriterBuilder
impl Clone for WriterBuilder
Source§fn clone(&self) -> WriterBuilder
fn clone(&self) -> WriterBuilder
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 !Freeze for WriterBuilder
impl !RefUnwindSafe for WriterBuilder
impl !UnwindSafe for WriterBuilder
impl Send for WriterBuilder
impl Sync for WriterBuilder
impl Unpin for WriterBuilder
impl UnsafeUnpin for WriterBuilder
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> 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