Struct carapax::types::InputMessageContentLocation
source · pub struct InputMessageContentLocation { /* private fields */ }
Expand description
Represents a location message to be sent as the result of an inline query.
Implementations§
source§impl InputMessageContentLocation
impl InputMessageContentLocation
sourcepub fn new(latitude: f32, longitude: f32) -> InputMessageContentLocation
pub fn new(latitude: f32, longitude: f32) -> InputMessageContentLocation
Creates a new InputMessageContentLocation
.
§Arguments
latitude
- Latitude in degrees.longitude
- Longitude in degrees.
sourcepub fn with_heading(self, value: i64) -> InputMessageContentLocation
pub fn with_heading(self, value: i64) -> InputMessageContentLocation
sourcepub fn with_horizontal_accuracy(self, value: f32) -> InputMessageContentLocation
pub fn with_horizontal_accuracy(self, value: f32) -> InputMessageContentLocation
Sets a new horizontal accuracy.
§Arguments
value
- A radius of uncertainty for the location; in meters; 0-1500.
sourcepub fn with_live_period(self, value: i64) -> InputMessageContentLocation
pub fn with_live_period(self, value: i64) -> InputMessageContentLocation
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
) -> InputMessageContentLocation
pub fn with_proximity_alert_radius( self, value: i64 ) -> InputMessageContentLocation
Sets a new proximity alert radius.
§Arguments
value
- A maximum distance for proximity alerts about approaching another chat member; in meters; 1-100000.
Trait Implementations§
source§impl Clone for InputMessageContentLocation
impl Clone for InputMessageContentLocation
source§fn clone(&self) -> InputMessageContentLocation
fn clone(&self) -> InputMessageContentLocation
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 InputMessageContentLocation
impl Debug for InputMessageContentLocation
source§impl<'de> Deserialize<'de> for InputMessageContentLocation
impl<'de> Deserialize<'de> for InputMessageContentLocation
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<InputMessageContentLocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<InputMessageContentLocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<InputMessageContentLocation> for InputMessageContent
impl From<InputMessageContentLocation> for InputMessageContent
source§fn from(original: InputMessageContentLocation) -> InputMessageContent
fn from(original: InputMessageContentLocation) -> InputMessageContent
Converts to this type from the input type.
source§impl From<Location> for InputMessageContentLocation
impl From<Location> for InputMessageContentLocation
source§fn from(value: Location) -> InputMessageContentLocation
fn from(value: Location) -> InputMessageContentLocation
Converts to this type from the input type.
source§impl PartialEq for InputMessageContentLocation
impl PartialEq for InputMessageContentLocation
source§fn eq(&self, other: &InputMessageContentLocation) -> bool
fn eq(&self, other: &InputMessageContentLocation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InputMessageContentLocation
impl PartialOrd for InputMessageContentLocation
source§fn partial_cmp(&self, other: &InputMessageContentLocation) -> Option<Ordering>
fn partial_cmp(&self, other: &InputMessageContentLocation) -> 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 InputMessageContentLocation
impl Serialize for InputMessageContentLocation
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
impl StructuralPartialEq for InputMessageContentLocation
Auto Trait Implementations§
impl Freeze for InputMessageContentLocation
impl RefUnwindSafe for InputMessageContentLocation
impl Send for InputMessageContentLocation
impl Sync for InputMessageContentLocation
impl Unpin for InputMessageContentLocation
impl UnwindSafe for InputMessageContentLocation
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