Story

Struct Story 

Source
pub struct Story {
Show 24 fields pub id: i32, pub sender_chat_id: i64, pub sender_id: Option<MessageSender>, pub date: i32, pub is_being_sent: bool, pub is_being_edited: bool, pub is_edited: bool, pub is_posted_to_chat_page: bool, pub is_visible_only_for_self: bool, pub can_be_deleted: bool, pub can_be_edited: bool, pub can_be_forwarded: bool, pub can_be_replied: bool, pub can_toggle_is_posted_to_chat_page: bool, pub can_get_statistics: bool, pub can_get_interactions: bool, pub has_expired_viewers: bool, pub repost_info: Option<StoryRepostInfo>, pub interaction_info: Option<StoryInteractionInfo>, pub chosen_reaction_type: Option<ReactionType>, pub privacy_settings: StoryPrivacySettings, pub content: StoryContent, pub areas: Vec<StoryArea>, pub caption: FormattedText,
}
Expand description

Represents a story

Fields§

§id: i32

Unique story identifier among stories of the given sender

§sender_chat_id: i64

Identifier of the chat that posted the story

§sender_id: Option<MessageSender>

Identifier of the sender of the story; may be null if the story is posted on behalf of the sender_chat_id

§date: i32

Point in time (Unix timestamp) when the story was published

§is_being_sent: bool

True, if the story is being sent by the current user

§is_being_edited: bool

True, if the story is being edited by the current user

§is_edited: bool

True, if the story was edited

§is_posted_to_chat_page: bool

True, if the story is saved in the sender’s profile and will be available there after expiration

§is_visible_only_for_self: bool

True, if the story is visible only for the current user

§can_be_deleted: bool

True, if the story can be deleted

§can_be_edited: bool

True, if the story can be edited

§can_be_forwarded: bool

True, if the story can be forwarded as a message. Otherwise, screenshots and saving of the story content must be also forbidden

§can_be_replied: bool

True, if the story can be replied in the chat with the story sender

§can_toggle_is_posted_to_chat_page: bool

True, if the story’s is_posted_to_chat_page value can be changed

§can_get_statistics: bool

True, if the story statistics are available through getStoryStatistics

§can_get_interactions: bool

True, if interactions with the story can be received through getStoryInteractions

§has_expired_viewers: bool

True, if users viewed the story can’t be received, because the story has expired more than getOption(“story_viewers_expiration_delay”) seconds ago

§repost_info: Option<StoryRepostInfo>

Information about the original story; may be null if the story wasn’t reposted

§interaction_info: Option<StoryInteractionInfo>

Information about interactions with the story; may be null if the story isn’t owned or there were no interactions

§chosen_reaction_type: Option<ReactionType>

Type of the chosen reaction; may be null if none

§privacy_settings: StoryPrivacySettings

Privacy rules affecting story visibility; may be approximate for non-owned stories

§content: StoryContent

Content of the story

§areas: Vec<StoryArea>

Clickable areas to be shown on the story content

§caption: FormattedText

Caption of the story

Trait Implementations§

Source§

impl Clone for Story

Source§

fn clone(&self) -> Story

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Story

Source§

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

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

impl<'de> Deserialize<'de> for Story

Source§

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

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

impl PartialEq for Story

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 Story

Source§

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

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

impl StructuralPartialEq for Story

Auto Trait Implementations§

§

impl Freeze for Story

§

impl RefUnwindSafe for Story

§

impl Send for Story

§

impl Sync for Story

§

impl Unpin for Story

§

impl UnwindSafe for Story

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,