pub struct DataObjectOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a DataObject message.
Wraps ::buffa::OwnedView<DataObjectView<'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 DataObjectView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl DataObjectOwnedView
impl DataObjectOwnedView
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: &DataObject) -> Result<Self, DecodeError>
pub fn from_owned(msg: &DataObject) -> 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) -> &DataObjectView<'_>
pub fn view(&self) -> &DataObjectView<'_>
Borrow the full DataObjectView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> DataObject
pub fn to_owned_message(&self) -> DataObject
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 name(&self) -> &str
pub fn name(&self) -> &str
A fully qualified name that uniquely identifies a data object.
For example, a table’s fully qualified name is in the format of <catalog>.<schema>.<table>,
Field 1: name
Sourcepub fn data_object_type(&self) -> EnumValue<DataObjectType>
pub fn data_object_type(&self) -> EnumValue<DataObjectType>
Type of the data object.
Field 2: data_object_type
Sourcepub fn added_at(&self) -> Option<i64>
pub fn added_at(&self) -> Option<i64>
The time when this data object is added to the share, in epoch milliseconds.
Field 3: added_at
Sourcepub fn comment(&self) -> Option<&str>
pub fn comment(&self) -> Option<&str>
A user-provided comment when adding the data object to the share.
Field 5: comment
A user-provided new name for the data object within the share.
If this new name is not provided, the object’s original name will be used as the shared_as name. The shared_as name must be unique within a share. For tables, the new name must follow the format of <schema>.<table>.
Field 6: shared_as
Sourcepub fn partitions(&self) -> &RepeatedView<'_, &str>
pub fn partitions(&self) -> &RepeatedView<'_, &str>
Array of partitions for the shared data.
Field 7: partitions
Sourcepub fn enable_cdf(&self) -> Option<bool>
pub fn enable_cdf(&self) -> Option<bool>
Whether to enable cdf or indicate if cdf is enabled on the shared object.
Field 8: enable_cdf
Sourcepub fn history_data_sharing_status(&self) -> Option<EnumValue<HistoryStatus>>
pub fn history_data_sharing_status(&self) -> Option<EnumValue<HistoryStatus>>
Whether to enable or disable sharing of data history. If not specified, the default is DISABLED.
Field 9: history_data_sharing_status
Sourcepub fn start_version(&self) -> Option<i64>
pub fn start_version(&self) -> Option<i64>
The start version associated with the object.
This allows data providers to control the lowest object version that is accessible by clients. If specified, clients can query snapshots or changes for versions >= start_version. If not specified, clients can only query starting from the version of the object at the time it was added to the share.
NOTE: The start_version should be <= the current version of the object.
Field 10: start_version
Trait Implementations§
Source§impl AsRef<OwnedView<DataObjectView<'static>>> for DataObjectOwnedView
impl AsRef<OwnedView<DataObjectView<'static>>> for DataObjectOwnedView
Source§fn as_ref(&self) -> &OwnedView<DataObjectView<'static>>
fn as_ref(&self) -> &OwnedView<DataObjectView<'static>>
Source§impl Clone for DataObjectOwnedView
impl Clone for DataObjectOwnedView
Source§fn clone(&self) -> DataObjectOwnedView
fn clone(&self) -> DataObjectOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more