pub struct MessageKeyView<'a> {
pub remote_jid: Option<&'a str>,
pub from_me: Option<bool>,
pub id: Option<&'a str>,
pub participant: Option<&'a str>,
}Fields§
§remote_jid: Option<&'a str>Field 1: remoteJid
from_me: Option<bool>Field 2: fromMe
id: Option<&'a str>Field 3: id
participant: Option<&'a str>Field 4: participant
Trait Implementations§
Source§impl<'a> Clone for MessageKeyView<'a>
impl<'a> Clone for MessageKeyView<'a>
Source§fn clone(&self) -> MessageKeyView<'a>
fn clone(&self) -> MessageKeyView<'a>
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 moreSource§impl<'a> Debug for MessageKeyView<'a>
impl<'a> Debug for MessageKeyView<'a>
Source§impl<'a> Default for MessageKeyView<'a>
impl<'a> Default for MessageKeyView<'a>
Source§fn default() -> MessageKeyView<'a>
fn default() -> MessageKeyView<'a>
Returns the “default value” for a type. Read more
Source§impl<'v> DefaultViewInstance for MessageKeyView<'v>
impl<'v> DefaultViewInstance for MessageKeyView<'v>
Source§fn default_view_instance<'a>() -> &'a MessageKeyView<'v>where
MessageKeyView<'v>: 'a,
fn default_view_instance<'a>() -> &'a MessageKeyView<'v>where
MessageKeyView<'v>: 'a,
Return a reference to the single default view instance. Read more
Source§impl<'a> MessageName for MessageKeyView<'a>
impl<'a> MessageName for MessageKeyView<'a>
Source§const PACKAGE: &'static str = "whatsapp"
const PACKAGE: &'static str = "whatsapp"
The protobuf package the message is declared in. Read more
Source§const NAME: &'static str = "MessageKey"
const NAME: &'static str = "MessageKey"
The unqualified message name, with
. between nesting levels. Read moreSource§impl<'a> MessageView<'a> for MessageKeyView<'a>
impl<'a> MessageView<'a> for MessageKeyView<'a>
Source§type Owned = MessageKey
type Owned = MessageKey
The corresponding owned message type.
Source§fn decode_view(buf: &'a [u8]) -> Result<MessageKeyView<'a>, DecodeError>
fn decode_view(buf: &'a [u8]) -> Result<MessageKeyView<'a>, DecodeError>
Decode a view from a buffer, borrowing string/bytes fields directly. Read more
Source§fn decode_view_with_ctx(
buf: &'a [u8],
ctx: DecodeContext<'_>,
) -> Result<MessageKeyView<'a>, DecodeError>
fn decode_view_with_ctx( buf: &'a [u8], ctx: DecodeContext<'_>, ) -> Result<MessageKeyView<'a>, DecodeError>
Decode a view under custom decode limits. Read more
Source§fn merge_view_field(
&mut self,
tag: Tag,
cur: &'a [u8],
_before_tag: &'a [u8],
ctx: DecodeContext<'_>,
) -> Result<&'a [u8], DecodeError>
fn merge_view_field( &mut self, tag: Tag, cur: &'a [u8], _before_tag: &'a [u8], ctx: DecodeContext<'_>, ) -> Result<&'a [u8], DecodeError>
Decode one field’s payload into this view (generated per message). Read more
Source§fn to_owned_message(&self) -> Result<MessageKey, DecodeError>
fn to_owned_message(&self) -> Result<MessageKey, DecodeError>
Convert this view to the owned message type. Read more
Source§fn to_owned_from_source(
&self,
__buffa_src: Option<&Bytes>,
) -> Result<MessageKey, DecodeError>
fn to_owned_from_source( &self, __buffa_src: Option<&Bytes>, ) -> Result<MessageKey, DecodeError>
Convert this view to the owned message type, optionally slicing
bytes::Bytes-typed fields from source instead of copying. Read moreSource§fn decode_view_ctx(
buf: &'a [u8],
ctx: DecodeContext<'_>,
) -> Result<Self, DecodeError>where
Self: Default,
fn decode_view_ctx(
buf: &'a [u8],
ctx: DecodeContext<'_>,
) -> Result<Self, DecodeError>where
Self: Default,
Decode a view under an explicit
DecodeContext
(remaining recursion depth and unknown-field allowance), driving the
provided tag loop over merge_view_field. Read moreSource§fn merge_into_view(
&mut self,
buf: &'a [u8],
ctx: DecodeContext<'_>,
) -> Result<(), DecodeError>
fn merge_into_view( &mut self, buf: &'a [u8], ctx: DecodeContext<'_>, ) -> Result<(), DecodeError>
Merge fields from
buf into this view (proto merge semantics):
repeated fields append, singular fields last-wins, singular message
fields merge recursively. Read moreSource§impl<'a> ViewEncode<'a> for MessageKeyView<'a>
impl<'a> ViewEncode<'a> for MessageKeyView<'a>
Source§fn compute_size(&self, _cache: &mut SizeCache) -> u32
fn compute_size(&self, _cache: &mut SizeCache) -> u32
Source§fn write_to(&self, _cache: &mut SizeCache, buf: &mut impl EncodeSink)
fn write_to(&self, _cache: &mut SizeCache, buf: &mut impl EncodeSink)
Write this view’s encoded bytes to a buffer, consuming
nested-message sizes from
cache (populated by a prior
compute_size call on the same cache). Read moreSource§fn encode(&self, buf: &mut impl EncodeSink)
fn encode(&self, buf: &mut impl EncodeSink)
Compute size, then write. Primary view-encode entry point. Read more
Source§fn try_encode(&self, buf: &mut impl EncodeSink) -> Result<(), EncodeError>
fn try_encode(&self, buf: &mut impl EncodeSink) -> Result<(), EncodeError>
Encode, returning an error instead of panicking if the encoded size
exceeds the 2 GiB protobuf limit
(
MAX_MESSAGE_BYTES). Read moreSource§fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl EncodeSink)
fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl EncodeSink)
Source§fn try_encode_with_cache(
&self,
cache: &mut SizeCache,
buf: &mut impl EncodeSink,
) -> Result<(), EncodeError>
fn try_encode_with_cache( &self, cache: &mut SizeCache, buf: &mut impl EncodeSink, ) -> Result<(), EncodeError>
Encode with a caller-supplied
SizeCache,
returning an error instead of panicking if the encoded size exceeds
the 2 GiB protobuf limit (MAX_MESSAGE_BYTES).
Clears the cache first. Read moreSource§fn try_encode_bounded(
&self,
max_bytes: u32,
buf: &mut impl EncodeSink,
) -> Result<u32, EncodeError>
fn try_encode_bounded( &self, max_bytes: u32, buf: &mut impl EncodeSink, ) -> Result<u32, EncodeError>
Encode this view into
buf only if its encoded size fits within
max_bytes, using a single size pass that is then reused for the write. Read moreSource§fn try_encode_bounded_with_cache(
&self,
max_bytes: u32,
cache: &mut SizeCache,
buf: &mut impl EncodeSink,
) -> Result<u32, EncodeError>
fn try_encode_bounded_with_cache( &self, max_bytes: u32, cache: &mut SizeCache, buf: &mut impl EncodeSink, ) -> Result<u32, EncodeError>
Source§fn encoded_len(&self) -> u32
fn encoded_len(&self) -> u32
Compute the encoded byte size of this view. Read more
Source§fn try_encoded_len(&self) -> Result<u32, EncodeError>
fn try_encoded_len(&self) -> Result<u32, EncodeError>
Compute the encoded byte size, returning an error instead of
panicking if it exceeds the 2 GiB protobuf limit
(
MAX_MESSAGE_BYTES). Read moreSource§fn encode_length_delimited(&self, buf: &mut impl EncodeSink)
fn encode_length_delimited(&self, buf: &mut impl EncodeSink)
Encode this view as a length-delimited byte sequence. Read more
Source§fn try_encode_length_delimited(
&self,
buf: &mut impl EncodeSink,
) -> Result<(), EncodeError>
fn try_encode_length_delimited( &self, buf: &mut impl EncodeSink, ) -> Result<(), EncodeError>
Encode as a length-delimited byte sequence, returning an error
instead of panicking if the encoded size exceeds the 2 GiB protobuf
limit (
MAX_MESSAGE_BYTES). Read moreSource§fn try_encode_to_vec(&self) -> Result<Vec<u8>, EncodeError>
fn try_encode_to_vec(&self) -> Result<Vec<u8>, EncodeError>
Encode to a new
Vec<u8>, returning an error instead of panicking
if the encoded size exceeds the 2 GiB protobuf limit
(MAX_MESSAGE_BYTES). Read moreSource§fn encode_to_bytes(&self) -> Bytes
fn encode_to_bytes(&self) -> Bytes
Encode this view to a new
bytes::Bytes. Read moreSource§fn try_encode_to_bytes(&self) -> Result<Bytes, EncodeError>
fn try_encode_to_bytes(&self) -> Result<Bytes, EncodeError>
Encode to a new
bytes::Bytes, returning an error instead of
panicking if the encoded size exceeds the 2 GiB protobuf limit
(MAX_MESSAGE_BYTES). Read moreSource§impl ViewReborrow for MessageKeyView<'static>
impl ViewReborrow for MessageKeyView<'static>
Source§type Reborrowed<'b> = MessageKeyView<'b>
type Reborrowed<'b> = MessageKeyView<'b>
The same view type with its lifetime shortened to
'b.Source§fn reborrow<'b>(
this: &'b MessageKeyView<'static>,
) -> &'b <MessageKeyView<'static> as ViewReborrow>::Reborrowed<'b>
fn reborrow<'b>( this: &'b MessageKeyView<'static>, ) -> &'b <MessageKeyView<'static> as ViewReborrow>::Reborrowed<'b>
Coerce
&'b Self (= &'b FooView<'static>) to
&'b Self::Reborrowed<'b> (= &'b FooView<'b>). The canonical body
is just this; the compiler accepts it via standard lifetime
variance for covariant view types. Read moreAuto Trait Implementations§
impl<'a> Freeze for MessageKeyView<'a>
impl<'a> RefUnwindSafe for MessageKeyView<'a>
impl<'a> Send for MessageKeyView<'a>
impl<'a> Sync for MessageKeyView<'a>
impl<'a> Unpin for MessageKeyView<'a>
impl<'a> UnsafeUnpin for MessageKeyView<'a>
impl<'a> UnwindSafe for MessageKeyView<'a>
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
Add an aggregate function filter Read more
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>,
Add an aggregate function order Read more
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
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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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
Convert
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
Convert
&self to an expression for Diesel’s query builder. Read moreimpl<T> MaybeSend for T
impl<T> MaybeSendSync for T
impl<T> Spawnable for Twhere
T: Send + 'static,
Source§impl<T> WindowExpressionMethods for T
impl<T> WindowExpressionMethods for T
Source§fn over(self) -> Self::Outputwhere
Self: OverDsl,
fn over(self) -> Self::Outputwhere
Self: OverDsl,
Turn a function call into a window function call Read more
Source§fn window_filter<P>(self, f: P) -> Self::Output
fn window_filter<P>(self, f: P) -> Self::Output
Add a filter to the current window function Read more
Source§fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
Add a partition clause to the current window function Read more
Source§fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
Add a order clause to the current window function Read more