pub struct PreKeyRecordStructureOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a PreKeyRecordStructure message.
Wraps ::buffa::OwnedView<PreKeyRecordStructureView<'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 PreKeyRecordStructureView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl PreKeyRecordStructureOwnedView
impl PreKeyRecordStructureOwnedView
Sourcepub fn decode(
bytes: Bytes,
) -> Result<PreKeyRecordStructureOwnedView, DecodeError>
pub fn decode( bytes: Bytes, ) -> Result<PreKeyRecordStructureOwnedView, 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<PreKeyRecordStructureOwnedView, DecodeError>
pub fn decode_with_options( bytes: Bytes, opts: &DecodeOptions, ) -> Result<PreKeyRecordStructureOwnedView, 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: &PreKeyRecordStructure,
) -> Result<PreKeyRecordStructureOwnedView, DecodeError>
pub fn from_owned( msg: &PreKeyRecordStructure, ) -> Result<PreKeyRecordStructureOwnedView, DecodeError>
Build from an owned message via an encode → decode round-trip.
§Errors
Returns ::buffa::DecodeError::MessageTooLarge if the
message’s encoded size exceeds the 2 GiB protobuf limit, or
another ::buffa::DecodeError if the re-encoded bytes are
somehow invalid (should not happen for well-formed messages).
Sourcepub fn view(&self) -> &PreKeyRecordStructureView<'_>
pub fn view(&self) -> &PreKeyRecordStructureView<'_>
Borrow the full PreKeyRecordStructureView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> PreKeyRecordStructure
pub fn to_owned_message(&self) -> PreKeyRecordStructure
Convert to the owned message type.
Infallible: this type’s constructors wire-decode their
buffer, and a view produced by wire decoding always
converts. Delegates to ::buffa::OwnedView::to_owned_message,
whose contract also governs handles converted from a raw
::buffa::OwnedView.
Sourcepub fn into_bytes(self) -> Bytes
pub fn into_bytes(self) -> Bytes
Consume the handle, returning the underlying bytes buffer.
Sourcepub fn public_key(&self) -> Option<&[u8]>
pub fn public_key(&self) -> Option<&[u8]>
Field 2: publicKey
Sourcepub fn private_key(&self) -> Option<&[u8]>
pub fn private_key(&self) -> Option<&[u8]>
Field 3: privateKey
Trait Implementations§
Source§impl AsRef<OwnedView<PreKeyRecordStructureView<'static>>> for PreKeyRecordStructureOwnedView
impl AsRef<OwnedView<PreKeyRecordStructureView<'static>>> for PreKeyRecordStructureOwnedView
Source§fn as_ref(&self) -> &OwnedView<PreKeyRecordStructureView<'static>>
fn as_ref(&self) -> &OwnedView<PreKeyRecordStructureView<'static>>
Source§impl Clone for PreKeyRecordStructureOwnedView
impl Clone for PreKeyRecordStructureOwnedView
Source§fn clone(&self) -> PreKeyRecordStructureOwnedView
fn clone(&self) -> PreKeyRecordStructureOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl From<OwnedView<PreKeyRecordStructureView<'static>>> for PreKeyRecordStructureOwnedView
impl From<OwnedView<PreKeyRecordStructureView<'static>>> for PreKeyRecordStructureOwnedView
Source§fn from(
inner: OwnedView<PreKeyRecordStructureView<'static>>,
) -> PreKeyRecordStructureOwnedView
fn from( inner: OwnedView<PreKeyRecordStructureView<'static>>, ) -> PreKeyRecordStructureOwnedView
Auto Trait Implementations§
impl !Freeze for PreKeyRecordStructureOwnedView
impl RefUnwindSafe for PreKeyRecordStructureOwnedView
impl Send for PreKeyRecordStructureOwnedView
impl Sync for PreKeyRecordStructureOwnedView
impl Unpin for PreKeyRecordStructureOwnedView
impl UnsafeUnpin for PreKeyRecordStructureOwnedView
impl UnwindSafe for PreKeyRecordStructureOwnedView
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more