Struct carapax::types::SendLocation
source · pub struct SendLocation { /* private fields */ }
Expand description
Sends a point on a map.
Implementations§
source§impl SendLocation
impl SendLocation
sourcepub fn new<T>(chat_id: T, latitude: f32, longitude: f32) -> SendLocation
pub fn new<T>(chat_id: T, latitude: f32, longitude: f32) -> SendLocation
Creates a new SendLocation
.
§Arguments
chat_id
- Unique identifier of the target chat.latitude
- Latitude.longitude
- Longitude.
sourcepub fn with_business_connection_id<T>(self, value: T) -> SendLocation
pub fn with_business_connection_id<T>(self, value: T) -> SendLocation
sourcepub fn with_disable_notification(self, value: bool) -> SendLocation
pub fn with_disable_notification(self, value: bool) -> SendLocation
Sets a new value for a disable_notification
flag.
§Arguments
value
- Indicates whether to send the message silently or not; a user will receive a notification without sound.
sourcepub fn with_heading(self, value: i64) -> SendLocation
pub fn with_heading(self, value: i64) -> SendLocation
sourcepub fn with_horizontal_accuracy(self, value: f32) -> SendLocation
pub fn with_horizontal_accuracy(self, value: f32) -> SendLocation
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) -> SendLocation
pub fn with_live_period(self, value: i64) -> SendLocation
Sets a new live period.
§Arguments
value
- Period in seconds during which the location will be updated.
See Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
sourcepub fn with_message_thread_id(self, value: i64) -> SendLocation
pub fn with_message_thread_id(self, value: i64) -> SendLocation
Sets a new message thread ID.
§Arguments
value
- Unique identifier of the target message thread; supergroups only.
sourcepub fn with_proximity_alert_radius(self, value: i64) -> SendLocation
pub fn with_proximity_alert_radius(self, value: i64) -> SendLocation
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_protect_content(self, value: bool) -> SendLocation
pub fn with_protect_content(self, value: bool) -> SendLocation
Sets a new value for a protect_content
flag.
§Arguments
value
- Indicates whether to protect the contents of the sent message from forwarding and saving.
sourcepub fn with_reply_markup<T>(self, value: T) -> SendLocationwhere
T: Into<ReplyMarkup>,
pub fn with_reply_markup<T>(self, value: T) -> SendLocationwhere
T: Into<ReplyMarkup>,
sourcepub fn with_reply_parameters(self, value: ReplyParameters) -> SendLocation
pub fn with_reply_parameters(self, value: ReplyParameters) -> SendLocation
Trait Implementations§
source§impl Clone for SendLocation
impl Clone for SendLocation
source§fn clone(&self) -> SendLocation
fn clone(&self) -> SendLocation
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 SendLocation
impl Debug for SendLocation
source§impl Method for SendLocation
impl Method for SendLocation
source§impl Serialize for SendLocation
impl Serialize for SendLocation
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
Auto Trait Implementations§
impl Freeze for SendLocation
impl RefUnwindSafe for SendLocation
impl Send for SendLocation
impl Sync for SendLocation
impl Unpin for SendLocation
impl UnwindSafe for SendLocation
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