Struct carapax::types::ChosenInlineResult
source · pub struct ChosenInlineResult {
pub from: User,
pub query: String,
pub result_id: String,
pub inline_message_id: Option<String>,
pub location: Option<Location>,
}
Expand description
Represents a result of an inline query that was chosen by the user and sent to their chat partner.
Fields§
§from: User
The user that chose the result.
query: String
The query that was used to obtain the result.
result_id: String
The unique identifier for the result that was chosen.
inline_message_id: Option<String>
Identifier of the sent inline message.
Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.
location: Option<Location>
Sender location, only for bots that require user location.
Implementations§
source§impl ChosenInlineResult
impl ChosenInlineResult
sourcepub fn new<A, B>(from: User, query: A, result_id: B) -> ChosenInlineResult
pub fn new<A, B>(from: User, query: A, result_id: B) -> ChosenInlineResult
Creates a new ChosenInlineResult
.
§Arguments
from
- The user that chose the result.query
- The query that was used to obtain the result.result_id
- Unique identifier of the chosen result.
sourcepub fn with_inline_message_id<T>(self, value: T) -> ChosenInlineResult
pub fn with_inline_message_id<T>(self, value: T) -> ChosenInlineResult
sourcepub fn with_location(self, value: Location) -> ChosenInlineResult
pub fn with_location(self, value: Location) -> ChosenInlineResult
Trait Implementations§
source§impl Clone for ChosenInlineResult
impl Clone for ChosenInlineResult
source§fn clone(&self) -> ChosenInlineResult
fn clone(&self) -> ChosenInlineResult
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ChosenInlineResult
impl Debug for ChosenInlineResult
source§impl<'de> Deserialize<'de> for ChosenInlineResult
impl<'de> Deserialize<'de> for ChosenInlineResult
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ChosenInlineResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ChosenInlineResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ChosenInlineResult
impl PartialEq for ChosenInlineResult
source§fn eq(&self, other: &ChosenInlineResult) -> bool
fn eq(&self, other: &ChosenInlineResult) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ChosenInlineResult
impl PartialOrd for ChosenInlineResult
source§fn partial_cmp(&self, other: &ChosenInlineResult) -> Option<Ordering>
fn partial_cmp(&self, other: &ChosenInlineResult) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ChosenInlineResult
impl Serialize for ChosenInlineResult
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,
Serialize this value into the given Serde serializer. Read more
source§impl TryFrom<Update> for ChosenInlineResult
impl TryFrom<Update> for ChosenInlineResult
§type Error = UnexpectedUpdate
type Error = UnexpectedUpdate
The type returned in the event of a conversion error.
source§fn try_from(
value: Update
) -> Result<ChosenInlineResult, <ChosenInlineResult as TryFrom<Update>>::Error>
fn try_from( value: Update ) -> Result<ChosenInlineResult, <ChosenInlineResult as TryFrom<Update>>::Error>
Performs the conversion.
source§impl TryFromInput for ChosenInlineResult
impl TryFromInput for ChosenInlineResult
§type Error = Infallible
type Error = Infallible
An error when conversion failed.
source§async fn try_from_input(
input: HandlerInput
) -> Result<Option<Self>, Self::Error>
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
Performs conversion. Read more
impl StructuralPartialEq for ChosenInlineResult
Auto Trait Implementations§
impl Freeze for ChosenInlineResult
impl RefUnwindSafe for ChosenInlineResult
impl Send for ChosenInlineResult
impl Sync for ChosenInlineResult
impl Unpin for ChosenInlineResult
impl UnwindSafe for ChosenInlineResult
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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