Add docstring to Message::from

This commit is contained in:
Boyd Kane 2023-02-08 10:50:28 +02:00 committed by GitHub
parent 6909353500
commit f5ff145a7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -620,6 +620,7 @@ mod getters {
/// [Message]: crate::types::Message
/// [telegram docs]: https://core.telegram.org/bots/api#message
impl Message {
/// Returns the user who sent the message.
#[must_use]
pub fn from(&self) -> Option<&User> {
match &self.kind {