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, ) -> PostStory ⓘ
Trait Implementations§
Source§impl MultipartPayload for PostStory
impl MultipartPayload for PostStory
fn copy_files(&self, into: &mut dyn FnMut(InputFile))
fn move_files(&mut self, into: &mut dyn FnMut(InputFile))
Source§impl Payload for PostStory
impl Payload for PostStory
Source§const NAME: &'static str = "PostStory"
const NAME: &'static str = "PostStory"
EditMessageTextInline).Source§const TELEGRAM_METHOD: &'static str = Self::NAME
const TELEGRAM_METHOD: &'static str = Self::NAME
EditMessageText). Defaults to the payload name.Source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
GetUpdates with
big timeout), the minimum timeout that should be used.Source§impl Serialize for PostStory
impl Serialize for PostStory
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl !Freeze for PostStory
impl !RefUnwindSafe for PostStory
impl !UnwindSafe for PostStory
impl Forget for PostStory
impl Move for PostStory
impl Send for PostStory
impl Sync for PostStory
impl Unpin for PostStorywhere
*const u8 is !null: Unpin,
Align8<*mut Waiter>: Unpin,
Arc<str>: Unpin,
&'static str: Unpin,
String: Unpin,
Arc<TakeCell<dyn AsyncRead + Send + Unpin>>: Unpin,
Arc<OnceCell<Result<Vec<Bytes>, Arc<Error>>>>: Unpin,
Arc<Sender<()>>: Unpin,
Arc<Shared<()>>: Unpin,
*const u8: Unpin,
Align8<*mut ()>: Unpin,
&'static Vtable: Unpin,
impl UnsafeUnpin for PostStorywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
Align8<*mut Waiter>: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
*const ArcInner<TakeCell<dyn AsyncRead + Send + Unpin>> is !null: UnsafeUnpin,
PhantomData<ArcInner<TakeCell<dyn AsyncRead + Send + Unpin>>>: UnsafeUnpin,
*const ArcInner<OnceCell<Result<Vec<Bytes>, Arc<Error>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<OnceCell<Result<Vec<Bytes>, Arc<Error>>>>>: UnsafeUnpin,
*const ArcInner<Sender<()>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Sender<()>>>: UnsafeUnpin,
*const ArcInner<Shared<()>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared<()>>>: UnsafeUnpin,
*const u8: UnsafeUnpin,
Align8<*mut ()>: UnsafeUnpin,
&'static Vtable: UnsafeUnpin,
PhantomData<MessageEntity>: UnsafeUnpin,
PhantomData<StoryArea>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 moreimpl<T> MaybeSend for T
impl<T> MaybeSync for T
Source§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) -> Self
fn caption_entities<T>(self, value: T) -> Self
caption_entities 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.