pub struct ProviderOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a Provider message.
Wraps ::buffa::OwnedView<ProviderView<'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 ProviderView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl ProviderOwnedView
impl ProviderOwnedView
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: &Provider) -> Result<Self, DecodeError>
pub fn from_owned(msg: &Provider) -> 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) -> &ProviderView<'_>
pub fn view(&self) -> &ProviderView<'_>
Borrow the full ProviderView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> Provider
pub fn to_owned_message(&self) -> Provider
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 authentication_type(&self) -> EnumValue<ProviderAuthenticationType>
pub fn authentication_type(&self) -> EnumValue<ProviderAuthenticationType>
The delta sharing authentication type.
Field 2: authentication_type
Sourcepub fn recipient_profile_str(&self) -> Option<&str>
pub fn recipient_profile_str(&self) -> Option<&str>
The recipient profile (credential file contents) used to connect to the sharing server, present only for TOKEN authentication.
Field 5: recipient_profile_str
Sourcepub fn properties(&self) -> &MapView<'_, &str, &str>
pub fn properties(&self) -> &MapView<'_, &str, &str>
A map of key-value properties attached to the provider.
Field 6: properties (map)
Sourcepub fn created_at(&self) -> Option<i64>
pub fn created_at(&self) -> Option<i64>
Time at which this provider was created, in epoch milliseconds.
Field 7: created_at
Sourcepub fn created_by(&self) -> Option<&str>
pub fn created_by(&self) -> Option<&str>
Username of the creator of the provider.
Field 8: created_by
Sourcepub fn updated_at(&self) -> Option<i64>
pub fn updated_at(&self) -> Option<i64>
Time at which this provider was updated, in epoch milliseconds.
Field 9: updated_at
Sourcepub fn updated_by(&self) -> Option<&str>
pub fn updated_by(&self) -> Option<&str>
Username of the provider updater.
Field 10: updated_by
Trait Implementations§
Source§impl AsRef<OwnedView<ProviderView<'static>>> for ProviderOwnedView
impl AsRef<OwnedView<ProviderView<'static>>> for ProviderOwnedView
Source§fn as_ref(&self) -> &OwnedView<ProviderView<'static>>
fn as_ref(&self) -> &OwnedView<ProviderView<'static>>
Source§impl Clone for ProviderOwnedView
impl Clone for ProviderOwnedView
Source§fn clone(&self) -> ProviderOwnedView
fn clone(&self) -> ProviderOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more