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 /// [Message]: crate::types::Message
/// [telegram docs]: https://core.telegram.org/bots/api#message /// [telegram docs]: https://core.telegram.org/bots/api#message
impl Message { impl Message {
/// Returns the user who sent the message.
#[must_use] #[must_use]
pub fn from(&self) -> Option<&User> { pub fn from(&self) -> Option<&User> {
match &self.kind { match &self.kind {