Struct carapax::types::InlineQueryResultLocation
source · pub struct InlineQueryResultLocation { /* private fields */ }
Expand description
Represents a location on a map.
By default, the location will be sent by the user.
Alternatively, you can use Self::with_input_message_content
to send a message with the specified content instead of the location.
Implementations§
source§impl InlineQueryResultLocation
impl InlineQueryResultLocation
sourcepub fn new<A, B>(
id: A,
latitude: f32,
longitude: f32,
title: B
) -> InlineQueryResultLocation
pub fn new<A, B>( id: A, latitude: f32, longitude: f32, title: B ) -> InlineQueryResultLocation
Creates a new InlineQueryResultLocation
.
§Arguments
id
- Unique identifier for this result; 1-64 bytes.latitude
- Location latitude in degrees.longitude
- Location longitude in degrees.title
- Location title.
sourcepub fn with_heading(self, value: i64) -> InlineQueryResultLocation
pub fn with_heading(self, value: i64) -> InlineQueryResultLocation
sourcepub fn with_horizontal_accuracy(self, value: f32) -> InlineQueryResultLocation
pub fn with_horizontal_accuracy(self, value: f32) -> InlineQueryResultLocation
Sets a new horizontal accuracy.
§Arguments
value
- A radius of uncertainty for the location; in meters; 0-1500.
sourcepub fn with_input_message_content<T>(
self,
value: T
) -> InlineQueryResultLocationwhere
T: Into<InputMessageContent>,
pub fn with_input_message_content<T>(
self,
value: T
) -> InlineQueryResultLocationwhere
T: Into<InputMessageContent>,
Sets a new input message content.
§Arguments
value
- Content of the message to be sent instead of the location.
sourcepub fn with_live_period(self, value: i64) -> InlineQueryResultLocation
pub fn with_live_period(self, value: i64) -> InlineQueryResultLocation
Sets a new live period.
§Arguments
value
- Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
sourcepub fn with_proximity_alert_radius(
self,
value: i64
) -> InlineQueryResultLocation
pub fn with_proximity_alert_radius( self, value: i64 ) -> InlineQueryResultLocation
Sets a new proximity alert radius.
§Arguments
value
- A maximum distance for proximity alerts about approaching another chat member; in meters; 1-100000.
sourcepub fn with_reply_markup<T>(self, value: T) -> InlineQueryResultLocationwhere
T: Into<InlineKeyboardMarkup>,
pub fn with_reply_markup<T>(self, value: T) -> InlineQueryResultLocationwhere
T: Into<InlineKeyboardMarkup>,
sourcepub fn with_thumbnail_height(self, value: i64) -> InlineQueryResultLocation
pub fn with_thumbnail_height(self, value: i64) -> InlineQueryResultLocation
sourcepub fn with_thumbnail_url<T>(self, value: T) -> InlineQueryResultLocation
pub fn with_thumbnail_url<T>(self, value: T) -> InlineQueryResultLocation
sourcepub fn with_thumbnail_width(self, value: i64) -> InlineQueryResultLocation
pub fn with_thumbnail_width(self, value: i64) -> InlineQueryResultLocation
Trait Implementations§
source§impl Clone for InlineQueryResultLocation
impl Clone for InlineQueryResultLocation
source§fn clone(&self) -> InlineQueryResultLocation
fn clone(&self) -> InlineQueryResultLocation
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 InlineQueryResultLocation
impl Debug for InlineQueryResultLocation
source§impl<'de> Deserialize<'de> for InlineQueryResultLocation
impl<'de> Deserialize<'de> for InlineQueryResultLocation
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<InlineQueryResultLocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<InlineQueryResultLocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<InlineQueryResultLocation> for InlineQueryResult
impl From<InlineQueryResultLocation> for InlineQueryResult
source§fn from(original: InlineQueryResultLocation) -> InlineQueryResult
fn from(original: InlineQueryResultLocation) -> InlineQueryResult
Converts to this type from the input type.
source§impl PartialEq for InlineQueryResultLocation
impl PartialEq for InlineQueryResultLocation
source§fn eq(&self, other: &InlineQueryResultLocation) -> bool
fn eq(&self, other: &InlineQueryResultLocation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for InlineQueryResultLocation
impl Serialize for InlineQueryResultLocation
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<RawInlineQueryResult> for InlineQueryResultLocation
impl TryFrom<RawInlineQueryResult> for InlineQueryResultLocation
source§fn try_from(
value: RawInlineQueryResult
) -> Result<InlineQueryResultLocation, <InlineQueryResultLocation as TryFrom<RawInlineQueryResult>>::Error>
fn try_from( value: RawInlineQueryResult ) -> Result<InlineQueryResultLocation, <InlineQueryResultLocation as TryFrom<RawInlineQueryResult>>::Error>
Performs the conversion.
impl StructuralPartialEq for InlineQueryResultLocation
Auto Trait Implementations§
impl Freeze for InlineQueryResultLocation
impl RefUnwindSafe for InlineQueryResultLocation
impl Send for InlineQueryResultLocation
impl Sync for InlineQueryResultLocation
impl Unpin for InlineQueryResultLocation
impl UnwindSafe for InlineQueryResultLocation
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