pub struct TableOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a Table message.
Wraps ::buffa::OwnedView<TableView<'static>>: the decoded view and the ::buffa::bytes::Bytes buffer it borrows from travel together, so the handle is 'static and Send + Sync — suitable for async handlers, spawned tasks, and anywhere a 'static bound is required.
Field accessors return borrows tied to &self. Use Self::view to get the full TableView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl TableOwnedView
impl TableOwnedView
Sourcepub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
pub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
Decode an owned view from a ::buffa::bytes::Bytes buffer.
The view borrows directly from the buffer’s data; the buffer is retained inside the returned handle.
§Errors
Returns ::buffa::DecodeError if the buffer contains invalid
protobuf data.
Sourcepub fn decode_with_options(
bytes: Bytes,
opts: &DecodeOptions,
) -> Result<Self, DecodeError>
pub fn decode_with_options( bytes: Bytes, opts: &DecodeOptions, ) -> Result<Self, DecodeError>
Decode with custom ::buffa::DecodeOptions (recursion limit,
max message size).
§Errors
Returns ::buffa::DecodeError if the buffer is invalid or
exceeds the configured limits.
Sourcepub fn from_owned(msg: &Table) -> Result<Self, DecodeError>
pub fn from_owned(msg: &Table) -> Result<Self, DecodeError>
Build from an owned message via an encode → decode round-trip.
§Errors
Returns ::buffa::DecodeError if the re-encoded bytes are
somehow invalid (should not happen for well-formed messages).
Sourcepub fn view(&self) -> &TableView<'_>
pub fn view(&self) -> &TableView<'_>
Borrow the full TableView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> Table
pub fn to_owned_message(&self) -> Table
Convert to the owned message type.
Sourcepub fn into_bytes(self) -> Bytes
pub fn into_bytes(self) -> Bytes
Consume the handle, returning the underlying bytes buffer.
Sourcepub fn catalog_name(&self) -> &str
pub fn catalog_name(&self) -> &str
Name of parent catalog.
Field 2: catalog_name
Sourcepub fn schema_name(&self) -> &str
pub fn schema_name(&self) -> &str
Name of parent schema.
Field 3: schema_name
Sourcepub fn table_type(&self) -> EnumValue<TableType>
pub fn table_type(&self) -> EnumValue<TableType>
Field 4: table_type
Sourcepub fn data_source_format(&self) -> EnumValue<DataSourceFormat>
pub fn data_source_format(&self) -> EnumValue<DataSourceFormat>
Data source format of the table.
Field 5: data_source_format
Sourcepub fn columns(&self) -> &RepeatedView<'_, ColumnView<'_>>
pub fn columns(&self) -> &RepeatedView<'_, ColumnView<'_>>
The array of Column definitions of the table’s columns.
Field 6: columns
Sourcepub fn storage_location(&self) -> Option<&str>
pub fn storage_location(&self) -> Option<&str>
Storage root URL for table (for MANAGED, EXTERNAL tables)
Field 7: storage_location
Sourcepub fn view_definition(&self) -> Option<&str>
pub fn view_definition(&self) -> Option<&str>
Definition text for view-like table types (VIEW, MATERIALIZED_VIEW, STREAMING_TABLE, METRIC_VIEW). The format depends on the table type: SQL for views, YAML for metric views.
Field 8: view_definition
Sourcepub fn view_dependencies(&self) -> &MessageFieldView<DependencyListView<'_>>
pub fn view_dependencies(&self) -> &MessageFieldView<DependencyListView<'_>>
Tables and functions the view-like table reads. For metric views this is derived from the view_definition by the server (the definition is the single source of truth).
Field 9: view_dependencies
Sourcepub fn owner(&self) -> Option<&str>
pub fn owner(&self) -> Option<&str>
optional string sql_path = 10;
Username of current owner of table.
Field 11: owner
Sourcepub fn comment(&self) -> Option<&str>
pub fn comment(&self) -> Option<&str>
User-provided free-form text description.
Field 12: comment
Sourcepub fn properties(&self) -> &MapView<'_, &str, &str>
pub fn properties(&self) -> &MapView<'_, &str, &str>
A map of key-value properties attached to the securable.
Field 13: properties (map)
Sourcepub fn storage_credential_name(&self) -> Option<&str>
pub fn storage_credential_name(&self) -> Option<&str>
Name of the storage credential, when a storage credential is configured for use with this table.
Field 14: storage_credential_name
Sourcepub fn full_name(&self) -> &str
pub fn full_name(&self) -> &str
List of table constraints. Note: this field is not set in the output of the listTables API. repeated TableConstraint constraints = 15;
optional string row_filter = 16;
Full name of table, in form of catalog_name.schema_name.table_name.
Field 17: full_name
Sourcepub fn created_at(&self) -> Option<i64>
pub fn created_at(&self) -> Option<i64>
Time at which this table was created, in epoch milliseconds.
Field 18: created_at
Sourcepub fn created_by(&self) -> Option<&str>
pub fn created_by(&self) -> Option<&str>
Username of table creator.
Field 19: created_by
Sourcepub fn updated_at(&self) -> Option<i64>
pub fn updated_at(&self) -> Option<i64>
Time at which this table was last updated, in epoch milliseconds.
Field 20: updated_at
Sourcepub fn updated_by(&self) -> Option<&str>
pub fn updated_by(&self) -> Option<&str>
Username of user who last modified table.
Field 21: updated_by
Sourcepub fn deleted_at(&self) -> Option<i64>
pub fn deleted_at(&self) -> Option<i64>
Time at which this table was deleted, in epoch milliseconds. Field is omitted if table is not deleted.
Field 22: deleted_at
Trait Implementations§
Source§impl Clone for TableOwnedView
impl Clone for TableOwnedView
Source§fn clone(&self) -> TableOwnedView
fn clone(&self) -> TableOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more