#[non_exhaustive]pub struct ActiveContextTimeToLiveBuilder { /* private fields */ }Expand description
A builder for ActiveContextTimeToLive.
Implementations§
source§impl ActiveContextTimeToLiveBuilder
impl ActiveContextTimeToLiveBuilder
sourcepub fn time_to_live_in_seconds(self, input: i32) -> Self
pub fn time_to_live_in_seconds(self, input: i32) -> Self
The number of seconds that the context is active. You can specify between 5 and 86400 seconds (24 hours).
This field is required.sourcepub fn set_time_to_live_in_seconds(self, input: Option<i32>) -> Self
pub fn set_time_to_live_in_seconds(self, input: Option<i32>) -> Self
The number of seconds that the context is active. You can specify between 5 and 86400 seconds (24 hours).
sourcepub fn get_time_to_live_in_seconds(&self) -> &Option<i32>
pub fn get_time_to_live_in_seconds(&self) -> &Option<i32>
The number of seconds that the context is active. You can specify between 5 and 86400 seconds (24 hours).
sourcepub fn turns_to_live(self, input: i32) -> Self
pub fn turns_to_live(self, input: i32) -> Self
The number of turns that the context is active. You can specify up to 20 turns. Each request and response from the bot is a turn.
This field is required.sourcepub fn set_turns_to_live(self, input: Option<i32>) -> Self
pub fn set_turns_to_live(self, input: Option<i32>) -> Self
The number of turns that the context is active. You can specify up to 20 turns. Each request and response from the bot is a turn.
sourcepub fn get_turns_to_live(&self) -> &Option<i32>
pub fn get_turns_to_live(&self) -> &Option<i32>
The number of turns that the context is active. You can specify up to 20 turns. Each request and response from the bot is a turn.
sourcepub fn build(self) -> Result<ActiveContextTimeToLive, BuildError>
pub fn build(self) -> Result<ActiveContextTimeToLive, BuildError>
Consumes the builder and constructs a ActiveContextTimeToLive.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for ActiveContextTimeToLiveBuilder
impl Clone for ActiveContextTimeToLiveBuilder
source§fn clone(&self) -> ActiveContextTimeToLiveBuilder
fn clone(&self) -> ActiveContextTimeToLiveBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for ActiveContextTimeToLiveBuilder
impl Default for ActiveContextTimeToLiveBuilder
source§fn default() -> ActiveContextTimeToLiveBuilder
fn default() -> ActiveContextTimeToLiveBuilder
source§impl PartialEq for ActiveContextTimeToLiveBuilder
impl PartialEq for ActiveContextTimeToLiveBuilder
source§fn eq(&self, other: &ActiveContextTimeToLiveBuilder) -> bool
fn eq(&self, other: &ActiveContextTimeToLiveBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for ActiveContextTimeToLiveBuilder
Auto Trait Implementations§
impl Freeze for ActiveContextTimeToLiveBuilder
impl RefUnwindSafe for ActiveContextTimeToLiveBuilder
impl Send for ActiveContextTimeToLiveBuilder
impl Sync for ActiveContextTimeToLiveBuilder
impl Unpin for ActiveContextTimeToLiveBuilder
impl UnwindSafe for ActiveContextTimeToLiveBuilder
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> 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 more