Skip to main content

Dialog

Struct Dialog 

Source
pub struct Dialog {
Show 16 fields pub peer: Option<Peer>, pub space_id: Option<i64>, pub archived: Option<bool>, pub pinned: Option<bool>, pub read_max_id: Option<i64>, pub unread_count: Option<i32>, pub chat_id: Option<i64>, pub unread_mark: Option<bool>, pub notification_settings: Option<DialogNotificationSettings>, pub sidebar_visible: Option<bool>, pub chat_list_hidden: Option<bool>, pub open: Option<bool>, pub opened_date: Option<i64>, pub order: Option<String>, pub pinned_order: Option<String>, pub follow_mode: Option<i32>,
}

Fields§

§peer: Option<Peer>§space_id: Option<i64>§archived: Option<bool>§pinned: Option<bool>§read_max_id: Option<i64>§unread_count: Option<i32>§chat_id: Option<i64>§unread_mark: Option<bool>§notification_settings: Option<DialogNotificationSettings>§sidebar_visible: Option<bool>
👎Deprecated

Deprecated wire field kept so old sidebar_visible=true does not decode as hidden.

§chat_list_hidden: Option<bool>

Hide noisy reply threads from normal chat lists; this is independent of sidebar inbox open state.

§open: Option<bool>

Stable sidebar inbox membership.

§opened_date: Option<i64>

Deprecated: sidebar ordering is now stored in order.

§order: Option<String>

Stable fractional order for normal sidebar inbox rows.

§pinned_order: Option<String>

Stable fractional order for pinned sidebar rows.

§follow_mode: Option<i32>

Reply-thread automatic surfacing policy.

Implementations§

Source§

impl Dialog

Source

pub fn space_id(&self) -> i64

Returns the value of space_id, or the default value if space_id is unset.

Source

pub fn archived(&self) -> bool

Returns the value of archived, or the default value if archived is unset.

Source

pub fn pinned(&self) -> bool

Returns the value of pinned, or the default value if pinned is unset.

Source

pub fn read_max_id(&self) -> i64

Returns the value of read_max_id, or the default value if read_max_id is unset.

Source

pub fn unread_count(&self) -> i32

Returns the value of unread_count, or the default value if unread_count is unset.

Source

pub fn chat_id(&self) -> i64

Returns the value of chat_id, or the default value if chat_id is unset.

Source

pub fn unread_mark(&self) -> bool

Returns the value of unread_mark, or the default value if unread_mark is unset.

Source

pub fn sidebar_visible(&self) -> bool

Returns the value of sidebar_visible, or the default value if sidebar_visible is unset.

Source

pub fn open(&self) -> bool

Returns the value of open, or the default value if open is unset.

Source

pub fn opened_date(&self) -> i64

Returns the value of opened_date, or the default value if opened_date is unset.

Source

pub fn chat_list_hidden(&self) -> bool

Returns the value of chat_list_hidden, or the default value if chat_list_hidden is unset.

Source

pub fn order(&self) -> &str

Returns the value of order, or the default value if order is unset.

Source

pub fn pinned_order(&self) -> &str

Returns the value of pinned_order, or the default value if pinned_order is unset.

Source

pub fn follow_mode(&self) -> DialogFollowMode

Returns the enum value of follow_mode, or the default if the field is unset or set to an invalid enum value.

Source

pub fn set_follow_mode(&mut self, value: DialogFollowMode)

Sets follow_mode to the provided enum value.

Trait Implementations§

Source§

impl Clone for Dialog

Source§

fn clone(&self) -> Dialog

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Dialog

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for Dialog

Source§

fn default() -> Dialog

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Dialog

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Dialog, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Message for Dialog

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for Dialog

Source§

fn eq(&self, other: &Dialog) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Dialog

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Dialog

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more