pub struct Telegram { /* private fields */ }
Implementations§
source§impl Telegram
impl Telegram
pub fn request<T>(&self, method: Method, body: &[u8]) -> Result<T>where T: DeserializeOwned,
pub fn request_with_attach<T, S>( &self, method: Method, query: HashMap<S, S>, body: &[u8] ) -> Result<T>where T: DeserializeOwned, S: Serialize,
source§impl Telegram
impl Telegram
pub fn get_me(&self) -> Result<Me>
pub fn log_out(&self) -> Result<True>
pub fn close(&self) -> Result<True>
pub fn send_message<T>(&self, chat_id: ChatId, text: T) -> Result<Message>where T: Into<String>,
pub fn forward_message( &self, chat_id: ChatId, from_chat_id: ChatId ) -> Result<Message>
pub fn copy_message( &self, chat_id: ChatId, from_chat_id: ChatId, message_id: MessageId ) -> Result<Message>
pub fn send_photo(&self, chat_id: ChatId, photo: InputFile) -> Result<Message>
pub fn send_audio(&self, chat_id: ChatId, audio: InputFile) -> Result<Message>
pub fn send_document( &self, chat_id: ChatId, document: InputFile ) -> Result<Message>
pub fn send_video(&self, chat_id: ChatId, video: InputFile) -> Result<Message>
pub fn send_animation( &self, chat_id: ChatId, animation: InputFile ) -> Result<Message>
pub fn send_voice(&self, chat_id: ChatId, voice: InputFile) -> Result<Message>
pub fn send_video_note( &self, chat_id: ChatId, video_note: InputFile ) -> Result<Message>
pub fn send_location( &self, chat_id: ChatId, latitude: f32, longitude: f32 ) -> Result<Message>
pub fn send_venue( &self, chat_id: ChatId, latitude: f32, longitude: f32, title: String, address: String ) -> Result<Message>
pub fn send_contract( &self, chat_id: ChatId, photo_number: String, first_name: String ) -> Result<Message>
pub fn send_poll( &self, chat_id: ChatId, question: String, options: Vec<String> ) -> Result<Message>
pub fn send_dice(&self, chat_id: ChatId) -> Result<Message>
pub fn send_chat_action( &self, chat_id: ChatId, action: String ) -> Result<Message>
pub fn get_user_profile_photos( &self, user_id: UserId ) -> Result<UserProfilePhotos>
pub fn get_file(&self, file_id: String) -> Result<File>
pub fn ban_chat_member(&self, chat_id: ChatId, user_id: UserId) -> Result<True>
pub fn unban_chat_member( &self, chat_id: ChatId, user_id: UserId ) -> Result<True>
pub fn restrict_chat_member( &self, chat_id: ChatId, user_id: UserId, permissions: ChatPermissions ) -> Result<True>
pub fn promote_chat_member( &self, chat_id: ChatId, user_id: UserId ) -> Result<True>
pub fn set_chat_administrator_custom_title( &self, chat_id: ChatId, user_id: UserId, custom_title: String ) -> Result<True>
pub fn ban_chat_sender_chat( &self, chat_id: ChatId, sender_chat_id: i32 ) -> Result<True>
pub fn unban_chat_sender_chat( &self, chat_id: ChatId, sender_chat_id: i32 ) -> Result<True>
pub fn set_chat_permissions( &self, chat_id: ChatId, permissions: ChatPermissions ) -> Result<True>
pub fn export_chat_invite_link(&self, chat_id: ChatId) -> Result<String>
pub fn create_chat_invite_link(&self, chat_id: ChatId) -> Result<ChatInviteLink>
pub fn edit_chat_invite_link( &self, chat_id: ChatId, invite_link: String ) -> Result<ChatInviteLink>
pub fn revoke_chat_invite_link( &self, chat_id: ChatId, invite_link: String ) -> Result<ChatInviteLink>
pub fn approve_chat_join_request( &self, chat_id: ChatId, user_id: UserId ) -> Result<True>
pub fn decline_chat_join_request( &self, chat_id: ChatId, user_id: UserId ) -> Result<True>
pub fn set_chat_photo(&self, chat_id: ChatId, photo: InputFile) -> Result<True>
pub fn delete_chat_photo(&self, chat_id: ChatId) -> Result<True>
pub fn set_chat_title(&self, chat_id: ChatId, title: String) -> Result<True>
pub fn set_chat_description(&self, chat_id: ChatId) -> Result<True>
pub fn pin_chat_message(&self, chat_id: ChatId, message_id: i32) -> Result<True>
pub fn unpin_chat_message(&self, chat_id: ChatId) -> Result<True>
pub fn unpin_all_chat_message(&self, chat_id: ChatId) -> Result<True>
pub fn leave_chat(&self, chat_id: ChatId) -> Result<True>
pub fn get_chat(&self, chat_id: ChatId) -> Result<Chat>
pub fn get_chat_administrators(&self, chat_id: ChatId) -> Result<ChatMember>
pub fn get_chat_member_count(&self, chat_id: ChatId) -> Result<i32>
pub fn get_chat_member( &self, chat_id: ChatId, user_id: UserId ) -> Result<ChatMember>
pub fn edit_message_text<T>( &self, chat_id: ChatId, message_id: MessageId, text: T ) -> Result<Message>where T: Into<String>,
Auto Trait Implementations§
impl RefUnwindSafe for Telegram
impl Send for Telegram
impl Sync for Telegram
impl Unpin for Telegram
impl UnwindSafe for Telegram
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