Struct tbot::bot::Bot [−][src]
#[must_use]pub struct Bot { /* fields omitted */ }
A Bot
is the entry point to interacting with the Bot API.
Using a Bot
, you can call methods from the methods
module:
let bot = tbot::from_env!("BOT_TOKEN"); let me = bot.get_me().call().await?; dbg!(me);
A Bot
is also used to construct an EventLoop
— a struct
responsible for configuring handlers and listening to updates:
use tbot::prelude::*; let mut bot = tbot::from_env!("BOT_TOKEN").event_loop(); bot.start(|context| async move { let result = context.send_message_in_reply("Hi!").call().await; if let Err(error) = result { eprintln!("Failed to send a message: {}", error); } }); bot.polling().start().await?;
A Bot
can be constructed in several ways:
- The
from_env!
macro constructs a bot extracting its token from an enviroment variable at compile time; - The
Bot::from_env
method constructs a bot extracting its token from an environment variable at runtime; - The
Bot::new
method constructs a bot, and its token is provided as a parameter; - The
bot::Builder
provides advanced configuration of a bot. You can set up an HTTPS/SOCKS5 proxy or your local Bot API server’s URL using it.
The bot’s internal data (its token, proxy and the URL where it makes
requests) is kept behind an Arc
. It means that you can clone a Bot
cheaply to share it between tasks.
Implementations
impl Bot
[src]
impl Bot
[src]pub fn new(token: String) -> Self
[src]
Constructs a new Bot
.
This method is a shorthand for a common case. If you need advanced
configuration, e.g. you want to set a proxy or use a local Bot API
server, construct a Bot
using a bot::Builder
.
pub fn from_env(env_var: &'static str) -> Self
[src]
Constructs a new Bot
, extracting the token from the environment at
runtime.
If you need to extract the token at compile time, use from_env!
.
This method is a shorthand for a common case. If you need advanced
configuration, e.g. you want to set a proxy or use a local Bot API
server, construct a Bot
using a bot::Builder
.
Example
use tbot::Bot; let bot = Bot::from_env("BOT_TOKEN"); let me = bot.get_me().call().await.unwrap(); dbg!(me);
pub async fn download_file(&self, file: &File) -> Result<Vec<u8>, Download>
[src]
Downloads a file.
If you use a self-hosted Bot API server, file.path
may be an absolute
local path. In this case, tbot
reads the file at the given and returns
it. If the server is running on another machine, you have to handle this
case manually before calling this method.
pub fn event_loop(self) -> EventLoop
[src]
Constructs an EventLoop
.
pub fn stateful_event_loop<S>(self, state: S) -> StatefulEventLoop<S> where
S: Send + Sync + 'static,
[src]
S: Send + Sync + 'static,
Constructs a stateful event loop.
pub fn add_sticker_to_set(
&self,
user_id: Id,
name: impl Into<String>,
png_sticker: impl Into<StickerForStickerSet>,
emojis: impl Into<String>
) -> AddStickerToSet<'_>
[src]
&self,
user_id: Id,
name: impl Into<String>,
png_sticker: impl Into<StickerForStickerSet>,
emojis: impl Into<String>
) -> AddStickerToSet<'_>
Adds a new sticker to an existing sticker set.
pub fn copy_message(
&self,
chat_id: impl ImplicitChatId,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> CopyMessage<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> CopyMessage<'_>
Copies a message.
pub fn create_chat_invite_link(
&self,
chat_id: impl ImplicitChatId
) -> CreateChatInviteLink<'_>
[src]
&self,
chat_id: impl ImplicitChatId
) -> CreateChatInviteLink<'_>
Creates a secondary invite link for a chat.
pub fn create_new_sticker_set(
&self,
user_id: Id,
name: impl Into<String>,
title: impl Into<String>,
png_sticker: impl Into<StickerForStickerSet>,
emojis: impl Into<String>
) -> CreateNewStickerSet<'_>
[src]
&self,
user_id: Id,
name: impl Into<String>,
title: impl Into<String>,
png_sticker: impl Into<StickerForStickerSet>,
emojis: impl Into<String>
) -> CreateNewStickerSet<'_>
Creates a new sticker set.
pub fn delete_chat_photo(
&self,
chat_id: impl ImplicitChatId
) -> DeleteChatPhoto<'_>
[src]
&self,
chat_id: impl ImplicitChatId
) -> DeleteChatPhoto<'_>
Deletes a chat’s photo.
pub fn delete_chat_sticker_set(
&self,
chat_id: impl ImplicitChatId
) -> DeleteChatStickerSet<'_>
[src]
&self,
chat_id: impl ImplicitChatId
) -> DeleteChatStickerSet<'_>
Deletes a chat’s sticker set.
pub fn delete_message(
&self,
chat_id: impl ImplicitChatId,
message_id: Id
) -> DeleteMessage<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id
) -> DeleteMessage<'_>
Deletes a message from a chat.
pub fn delete_sticker_from_set(
&self,
sticker: impl Into<String>
) -> DeleteStickerFromSet<'_>
[src]
&self,
sticker: impl Into<String>
) -> DeleteStickerFromSet<'_>
Deletes a sticker from a sticker set.
pub fn edit_chat_invite_link(
&self,
chat_id: impl ImplicitChatId,
link: impl Into<String>
) -> EditChatInviteLink<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
link: impl Into<String>
) -> EditChatInviteLink<'_>
Edits a secondary invite link for a chat.
pub fn edit_inline_caption(
&self,
inline_message_id: InlineMessageId,
caption: impl Into<Text>
) -> EditInlineCaption<'_>
[src]
&self,
inline_message_id: InlineMessageId,
caption: impl Into<Text>
) -> EditInlineCaption<'_>
Edits the caption of a media message sent via the inline mode.
pub fn edit_inline_location(
&self,
inline_message_id: InlineMessageId,
position: (f64, f64)
) -> EditInlineLocation<'_>
[src]
&self,
inline_message_id: InlineMessageId,
position: (f64, f64)
) -> EditInlineLocation<'_>
Edits a live location sent via the inline mode.
pub fn edit_inline_media(
&self,
inline_message_id: InlineMessageId,
media: impl Into<EditableMedia>
) -> EditInlineMedia<'_>
[src]
&self,
inline_message_id: InlineMessageId,
media: impl Into<EditableMedia>
) -> EditInlineMedia<'_>
Edits the media of a message sent via the inline mode.
pub fn edit_inline_reply_markup(
&self,
inline_message_id: InlineMessageId,
reply_markup: Keyboard
) -> EditInlineReplyMarkup<'_>
[src]
&self,
inline_message_id: InlineMessageId,
reply_markup: Keyboard
) -> EditInlineReplyMarkup<'_>
Edits the inline keyboard of a message sent via the inline mode.
pub fn edit_inline_text(
&self,
inline_message_id: InlineMessageId,
text: impl Into<Text>
) -> EditInlineText<'_>
[src]
&self,
inline_message_id: InlineMessageId,
text: impl Into<Text>
) -> EditInlineText<'_>
Edits the text of a message sent via the inline mode.
pub fn edit_message_caption(
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
caption: impl Into<Text>
) -> EditMessageCaption<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
caption: impl Into<Text>
) -> EditMessageCaption<'_>
Edits the caption of a media message sent by the bot itself.
pub fn edit_message_location(
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
position: (f64, f64)
) -> EditMessageLocation<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
position: (f64, f64)
) -> EditMessageLocation<'_>
Edits a live location sent by the bot itself.
pub fn edit_message_media(
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
media: impl Into<EditableMedia>
) -> EditMessageMedia<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
media: impl Into<EditableMedia>
) -> EditMessageMedia<'_>
Edits a live location sent by the bot itself.
pub fn edit_message_reply_markup(
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
reply_markup: Keyboard
) -> EditMessageReplyMarkup<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
reply_markup: Keyboard
) -> EditMessageReplyMarkup<'_>
Edits the inline keyboard of a message sent by the bot itself.
pub fn edit_message_text(
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
text: impl Into<Text>
) -> EditMessageText<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
text: impl Into<Text>
) -> EditMessageText<'_>
Edits the text of a message sent by the bot itself.
pub fn export_chat_invite_link(
&self,
chat_id: impl ImplicitChatId
) -> ExportChatInviteLink<'_>
[src]
&self,
chat_id: impl ImplicitChatId
) -> ExportChatInviteLink<'_>
Exports a chat’s invite link.
pub fn forward_message(
&self,
chat_id: impl ImplicitChatId,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> ForwardMessage<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
from_chat_id: impl ImplicitChatId,
message_id: Id
) -> ForwardMessage<'_>
Forwards a message.
pub fn get_chat(&self, chat_id: impl ImplicitChatId) -> GetChat<'_>
[src]
Gets information about a chat.
pub fn get_file(&self, file_id: Id) -> GetFile<'_>
[src]
Gets information about a file.
pub fn get_inline_game_high_scores(
&self,
inline_message_id: InlineMessageId,
user_id: Id
) -> GetInlineGameHighScores<'_>
[src]
&self,
inline_message_id: InlineMessageId,
user_id: Id
) -> GetInlineGameHighScores<'_>
Gets an excerpt from the high score table of a game sent via the inline mode.
pub fn get_chat_administrators(
&self,
chat_id: impl ImplicitChatId
) -> GetChatAdministrators<'_>
[src]
&self,
chat_id: impl ImplicitChatId
) -> GetChatAdministrators<'_>
Gets information about a chat’s admins.
pub fn get_chat_member(
&self,
chat_id: impl ImplicitChatId,
user_id: Id
) -> GetChatMember<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
user_id: Id
) -> GetChatMember<'_>
Gets information about a chat’s member.
pub fn get_chat_member_count(
&self,
chat_id: impl ImplicitChatId
) -> GetChatMemberCount<'_>
[src]
&self,
chat_id: impl ImplicitChatId
) -> GetChatMemberCount<'_>
Gets a chat’s member count.
pub fn get_message_game_high_scores(
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
user_id: Id
) -> GetMessageGameHighScores<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
user_id: Id
) -> GetMessageGameHighScores<'_>
Gets an excerpt from the high score table of a game sent by the bot itself.
pub fn get_me(&self) -> GetMe<'_>
[src]
Gets information about the bot.
pub fn get_my_commands(&self) -> GetMyCommands<'_>
[src]
Gets the list of the bot’s commands.
pub fn get_sticker_set(&self, name: impl Into<String>) -> GetStickerSet<'_>
[src]
Gets a sticker set by its name.
pub fn get_user_profile_photos(&self, user_id: Id) -> GetUserProfilePhotos<'_>
[src]
Gets a user’s profile photos.
pub fn get_webhook_info(&self) -> GetWebhookInfo<'_>
[src]
Gets information about the bot’s webhook.
pub fn ban_chat_member(
&self,
chat_id: impl ImplicitChatId,
user_id: Id
) -> BanChatMember<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
user_id: Id
) -> BanChatMember<'_>
Bans a member in a chat.
pub fn leave_chat(&self, chat_id: impl ImplicitChatId) -> LeaveChat<'_>
[src]
Leaves a chat.
pub fn pin_chat_message(
&self,
chat_id: impl ImplicitChatId,
message_id: Id
) -> PinChatMessage<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id
) -> PinChatMessage<'_>
Pins a message in a chat.
pub fn promote_chat_member(
&self,
chat_id: impl ImplicitChatId,
user_id: Id
) -> PromoteChatMember<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
user_id: Id
) -> PromoteChatMember<'_>
Promotes a chat member to an admin.
pub fn restrict_chat_member(
&self,
chat_id: impl ImplicitChatId,
user_id: Id,
permissions: Permissions
) -> RestrictChatMember<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
user_id: Id,
permissions: Permissions
) -> RestrictChatMember<'_>
Restricts a chat member.
pub fn revoke_chat_invite_link(
&self,
chat_id: impl ImplicitChatId,
link: impl Into<String>
) -> RevokeChatInviteLink<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
link: impl Into<String>
) -> RevokeChatInviteLink<'_>
Revokes an invite link for a chat.
pub fn send_animation(
&self,
chat_id: impl ImplicitChatId,
animation: Animation
) -> SendAnimation<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
animation: Animation
) -> SendAnimation<'_>
Sends an animation.
pub fn send_audio(
&self,
chat_id: impl ImplicitChatId,
audio: Audio
) -> SendAudio<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
audio: Audio
) -> SendAudio<'_>
Sends an audio.
pub fn send_chat_action(
&self,
chat_id: impl ImplicitChatId,
action: Action
) -> SendChatAction<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
action: Action
) -> SendChatAction<'_>
Sends a chat action.
pub fn send_contact(
&self,
chat_id: impl ImplicitChatId,
phone_number: impl Into<String>,
first_name: impl Into<String>
) -> SendContact<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
phone_number: impl Into<String>,
first_name: impl Into<String>
) -> SendContact<'_>
Sends a contact.
pub fn send_game(
&self,
chat_id: impl ImplicitChatId,
game_short_name: impl Into<String>
) -> SendGame<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
game_short_name: impl Into<String>
) -> SendGame<'_>
Sends a game.
pub fn send_dice(&self, chat_id: impl ImplicitChatId) -> SendDice<'_>
[src]
Sends a dice.
pub fn send_document(
&self,
chat_id: impl ImplicitChatId,
document: Document
) -> SendDocument<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
document: Document
) -> SendDocument<'_>
Sends a document.
pub fn send_invoice(
&self,
chat_id: impl Into<Id>,
invoice: Invoice
) -> SendInvoice<'_>
[src]
&self,
chat_id: impl Into<Id>,
invoice: Invoice
) -> SendInvoice<'_>
Sends an invoice.
pub fn send_location(
&self,
chat_id: impl ImplicitChatId,
position: (f64, f64)
) -> SendLocation<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
position: (f64, f64)
) -> SendLocation<'_>
Sends a location.
pub fn send_media_group(
&self,
chat_id: impl ImplicitChatId,
media: impl Into<MediaGroup>
) -> SendMediaGroup<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
media: impl Into<MediaGroup>
) -> SendMediaGroup<'_>
Sends an album.
pub fn send_message(
&self,
chat_id: impl ImplicitChatId,
text: impl Into<Text>
) -> SendMessage<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
text: impl Into<Text>
) -> SendMessage<'_>
Sends a text message.
pub fn send_photo(
&self,
chat_id: impl ImplicitChatId,
photo: Photo
) -> SendPhoto<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
photo: Photo
) -> SendPhoto<'_>
Sends a photo.
pub fn send_poll(&self, chat_id: impl ImplicitChatId, poll: Any) -> SendPoll<'_>
[src]
Sends a poll.
pub fn send_sticker(
&self,
chat_id: impl ImplicitChatId,
sticker: Sticker
) -> SendSticker<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
sticker: Sticker
) -> SendSticker<'_>
Sends a sticker.
pub fn send_venue(
&self,
chat_id: impl ImplicitChatId,
position: (f64, f64),
title: impl Into<String>,
address: impl Into<String>
) -> SendVenue<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
position: (f64, f64),
title: impl Into<String>,
address: impl Into<String>
) -> SendVenue<'_>
Sends a venue.
pub fn send_video_note(
&self,
chat_id: impl ImplicitChatId,
video_note: VideoNote
) -> SendVideoNote<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
video_note: VideoNote
) -> SendVideoNote<'_>
Sends a video note.
pub fn send_video(
&self,
chat_id: impl ImplicitChatId,
video: Video
) -> SendVideo<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
video: Video
) -> SendVideo<'_>
Sends a video.
pub fn send_voice(
&self,
chat_id: impl ImplicitChatId,
voice: Voice
) -> SendVoice<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
voice: Voice
) -> SendVoice<'_>
Sends a voice.
pub fn set_chat_administrator_custom_title(
&self,
chat_id: impl ImplicitChatId,
user_id: Id,
custom_title: impl Into<String>
) -> SetChatAdministratorCustomTitle<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
user_id: Id,
custom_title: impl Into<String>
) -> SetChatAdministratorCustomTitle<'_>
Sets a custom title for an admin in a chat.
pub fn set_chat_description(
&self,
chat_id: impl ImplicitChatId,
description: impl Into<String>
) -> SetChatDescription<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
description: impl Into<String>
) -> SetChatDescription<'_>
Sets a chat’s description.
pub fn set_chat_permissions(
&self,
chat_id: impl ImplicitChatId,
permissions: Permissions
) -> SetChatPermissions<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
permissions: Permissions
) -> SetChatPermissions<'_>
Sets a group’s global permissions.
pub fn set_chat_photo(
&self,
chat_id: impl ImplicitChatId,
photo: ChatPhoto
) -> SetChatPhoto<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
photo: ChatPhoto
) -> SetChatPhoto<'_>
Sets a chat’s photo.
pub fn set_chat_sticker_set(
&self,
chat_id: impl ImplicitChatId,
sticker_set_name: impl Into<String>
) -> SetChatStickerSet<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
sticker_set_name: impl Into<String>
) -> SetChatStickerSet<'_>
Sets a group’s sticker set.
pub fn set_chat_title(
&self,
chat_id: impl ImplicitChatId,
title: impl Into<String>
) -> SetChatTitle<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
title: impl Into<String>
) -> SetChatTitle<'_>
Sets a group’s title.
pub fn set_inline_game_score(
&self,
inline_message_id: InlineMessageId,
user_id: Id,
score: u32
) -> SetInlineGameScore<'_>
[src]
&self,
inline_message_id: InlineMessageId,
user_id: Id,
score: u32
) -> SetInlineGameScore<'_>
Sets a user’s new high score in a game sent via the inline mode.
pub fn set_message_game_score(
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
user_id: Id,
score: u32
) -> SetMessageGameScore<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id,
user_id: Id,
score: u32
) -> SetMessageGameScore<'_>
Sets a user’s new high score in a game sent by the bot itself.
pub fn set_my_commands(
&self,
commands: impl Into<Vec<BotCommand>>
) -> SetMyCommands<'_>
[src]
&self,
commands: impl Into<Vec<BotCommand>>
) -> SetMyCommands<'_>
Sets the list of the bot’s commands.
pub fn set_passport_data_errors(
&self,
user_id: Id,
errors: impl Into<Vec<Error>>
) -> SetPassportDataErrors<'_>
[src]
&self,
user_id: Id,
errors: impl Into<Vec<Error>>
) -> SetPassportDataErrors<'_>
Reports passport errors to the user.
pub fn set_sticker_position_in_set(
&self,
sticker: impl Into<String>,
position: u32
) -> SetStickerPositionInSet<'_>
[src]
&self,
sticker: impl Into<String>,
position: u32
) -> SetStickerPositionInSet<'_>
Changes a sticker’s position in a sticker set.
pub fn set_sticker_set_thumb(
&self,
user_id: Id,
name: impl Into<String>,
thumb: Option<StickerSetThumb>
) -> SetStickerSetThumb<'_>
[src]
&self,
user_id: Id,
name: impl Into<String>,
thumb: Option<StickerSetThumb>
) -> SetStickerSetThumb<'_>
Sets the thumb of a sticker set.
pub fn stop_inline_location(
&self,
inline_message_id: InlineMessageId
) -> StopInlineLocation<'_>
[src]
&self,
inline_message_id: InlineMessageId
) -> StopInlineLocation<'_>
Stops a live location sent via the inline mode.
pub fn stop_message_location(
&self,
chat_id: impl ImplicitChatId,
message_id: Id
) -> StopMessageLocation<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id
) -> StopMessageLocation<'_>
Stops a live location sent by the bot itself.
pub fn stop_poll(
&self,
chat_id: impl ImplicitChatId,
message_id: Id
) -> StopPoll<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
message_id: Id
) -> StopPoll<'_>
Stops a poll.
pub fn unban_chat_member(
&self,
chat_id: impl ImplicitChatId,
user_id: Id
) -> UnbanChatMember<'_>
[src]
&self,
chat_id: impl ImplicitChatId,
user_id: Id
) -> UnbanChatMember<'_>
Lifts all restrictions from a group’s member.
pub fn unpin_all_chat_messages(
&self,
chat_id: impl ImplicitChatId
) -> UnpinAllChatMessages<'_>
[src]
&self,
chat_id: impl ImplicitChatId
) -> UnpinAllChatMessages<'_>
Unpins all messages in a chat.
pub fn unpin_chat_message(
&self,
chat_id: impl ImplicitChatId
) -> UnpinChatMessage<'_>
[src]
&self,
chat_id: impl ImplicitChatId
) -> UnpinChatMessage<'_>
Unpins a chat message.
pub fn upload_sticker_file(
&self,
user_id: Id,
png_sticker: impl Into<Vec<u8>>
) -> UploadStickerFile<'_>
[src]
&self,
user_id: Id,
png_sticker: impl Into<Vec<u8>>
) -> UploadStickerFile<'_>
Uploads a sticker file.
Trait Implementations
impl ChatActionLoopBotExt for Bot
[src]
impl ChatActionLoopBotExt for Bot
[src]fn send_chat_action_in_loop(
&self,
chat_id: impl ImplicitChatId,
action: Action
) -> BoxFuture<'_, Result<Infallible, MethodCall>>
[src]
&self,
chat_id: impl ImplicitChatId,
action: Action
) -> BoxFuture<'_, Result<Infallible, MethodCall>>
Auto Trait Implementations
impl !RefUnwindSafe for Bot
impl Send for Bot
impl Sync for Bot
impl Unpin for Bot
impl !UnwindSafe for Bot
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self