pub struct GetChatHistoryInput {
pub peer_id: Option<InputPeer>,
pub offset_id: Option<i64>,
pub limit: Option<i32>,
pub mode: Option<i32>,
pub anchor_id: Option<i64>,
pub before_id: Option<i64>,
pub after_id: Option<i64>,
pub before_limit: Option<i32>,
pub after_limit: Option<i32>,
pub include_anchor: Option<bool>,
}Fields§
§peer_id: Option<InputPeer>§offset_id: Option<i64>Legacy older-history cursor.
When mode is not provided, this preserves old behavior and fetches messages with ID < offset_id.
limit: Option<i32>Number of messages to return.
For mode = HISTORY_MODE_AROUND, this acts as a fallback split if before/after limits are not provided.
mode: Option<i32>Explicit fetch mode for history pagination/windowing.
anchor_id: Option<i64>Around mode anchor message ID.
before_id: Option<i64>Older mode cursor (messages with ID < before_id).
after_id: Option<i64>Newer mode cursor (messages with ID > after_id).
before_limit: Option<i32>Around mode count for messages older than anchor.
after_limit: Option<i32>Around mode count for messages newer than anchor.
include_anchor: Option<bool>Around mode include anchor row in response.
Implementations§
Source§impl GetChatHistoryInput
impl GetChatHistoryInput
Sourcepub fn offset_id(&self) -> i64
pub fn offset_id(&self) -> i64
Returns the value of offset_id, or the default value if offset_id is unset.
Sourcepub fn mode(&self) -> GetChatHistoryMode
pub fn mode(&self) -> GetChatHistoryMode
Returns the enum value of mode, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_mode(&mut self, value: GetChatHistoryMode)
pub fn set_mode(&mut self, value: GetChatHistoryMode)
Sets mode to the provided enum value.
Sourcepub fn anchor_id(&self) -> i64
pub fn anchor_id(&self) -> i64
Returns the value of anchor_id, or the default value if anchor_id is unset.
Sourcepub fn before_id(&self) -> i64
pub fn before_id(&self) -> i64
Returns the value of before_id, or the default value if before_id is unset.
Sourcepub fn after_id(&self) -> i64
pub fn after_id(&self) -> i64
Returns the value of after_id, or the default value if after_id is unset.
Sourcepub fn before_limit(&self) -> i32
pub fn before_limit(&self) -> i32
Returns the value of before_limit, or the default value if before_limit is unset.
Sourcepub fn after_limit(&self) -> i32
pub fn after_limit(&self) -> i32
Returns the value of after_limit, or the default value if after_limit is unset.
Sourcepub fn include_anchor(&self) -> bool
pub fn include_anchor(&self) -> bool
Returns the value of include_anchor, or the default value if include_anchor is unset.
Trait Implementations§
Source§impl Clone for GetChatHistoryInput
impl Clone for GetChatHistoryInput
Source§fn clone(&self) -> GetChatHistoryInput
fn clone(&self) -> GetChatHistoryInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GetChatHistoryInput
impl Debug for GetChatHistoryInput
Source§impl Default for GetChatHistoryInput
impl Default for GetChatHistoryInput
Source§fn default() -> GetChatHistoryInput
fn default() -> GetChatHistoryInput
Source§impl<'de> Deserialize<'de> for GetChatHistoryInput
impl<'de> Deserialize<'de> for GetChatHistoryInput
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetChatHistoryInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetChatHistoryInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Message for GetChatHistoryInput
impl Message for GetChatHistoryInput
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for GetChatHistoryInput
impl PartialEq for GetChatHistoryInput
Source§fn eq(&self, other: &GetChatHistoryInput) -> bool
fn eq(&self, other: &GetChatHistoryInput) -> bool
self and other values to be equal, and is used by ==.