pub struct PostStory {
pub business_connection_id: BusinessConnectionId,
pub content: InputStoryContent,
pub active_period: Seconds,
pub caption: Option<String>,
pub parse_mode: Option<ParseMode>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub areas: Option<Vec<StoryArea>>,
pub post_to_chat_page: Option<bool>,
pub protect_content: Option<bool>,
}Expand description
Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.
Fields§
§business_connection_id: BusinessConnectionIdUnique identifier of the business connection
content: InputStoryContentContent of the story
active_period: SecondsPeriod after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400
caption: Option<String>Caption of the story, 0-2048 characters after entities parsing
parse_mode: Option<ParseMode>Mode for parsing entities in the story caption. See formatting options for more details
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
areas: Option<Vec<StoryArea>>List of clickable areas to be shown on the story
post_to_chat_page: Option<bool>Pass true to keep the story accessible after it expires
protect_content: Option<bool>Pass true if the content of the story must be protected from forwarding and screenshotting
Implementations§
Source§impl PostStory
impl PostStory
pub fn new( business_connection_id: BusinessConnectionId, content: InputStoryContent, active_period: Seconds, ) -> Self
Trait Implementations§
Source§impl Payload for PostStory
impl Payload for PostStory
Source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
GetUpdates with
big timeout), the minimum timeout that should be used.Auto Trait Implementations§
impl !Freeze for PostStory
impl !RefUnwindSafe for PostStory
impl !UnwindSafe for PostStory
impl Forget for PostStory
impl Send for PostStory
impl Sync for PostStory
impl Unpin for PostStory
impl UnsafeUnpin for PostStory
Blanket Implementations§
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> Erasable for T
impl<T> Erasable for T
Source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
Source§fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<P> PostStorySetters for Pwhere
P: HasPayload<Payload = PostStory>,
impl<P> PostStorySetters for Pwhere
P: HasPayload<Payload = PostStory>,
Source§fn business_connection_id(self, value: BusinessConnectionId) -> Self
fn business_connection_id(self, value: BusinessConnectionId) -> Self
business_connection_id field.Source§fn content(self, value: InputStoryContent) -> Self
fn content(self, value: InputStoryContent) -> Self
content field.Source§fn active_period(self, value: Seconds) -> Self
fn active_period(self, value: Seconds) -> Self
active_period field.Source§fn parse_mode(self, value: ParseMode) -> Self
fn parse_mode(self, value: ParseMode) -> Self
parse_mode field.Source§fn caption_entities<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = MessageEntity>,
fn caption_entities<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = MessageEntity>,
caption_entities field.Source§fn areas<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = StoryArea>,
fn areas<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = StoryArea>,
areas field.Source§fn post_to_chat_page(self, value: bool) -> Self
fn post_to_chat_page(self, value: bool) -> Self
post_to_chat_page field.Source§fn protect_content(self, value: bool) -> Self
fn protect_content(self, value: bool) -> Self
protect_content field.