From 26ba1919be12eb6a0df75607315c6332b27fd848 Mon Sep 17 00:00:00 2001 From: Waffle Date: Sat, 7 Sep 2019 22:17:14 +0300 Subject: [PATCH] Add docs for `core::types{Venue, Video}` --- src/core/types/venue.rs | 9 ++++++++- src/core/types/video.rs | 9 +++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/core/types/venue.rs b/src/core/types/venue.rs index 56048403..c4541447 100644 --- a/src/core/types/venue.rs +++ b/src/core/types/venue.rs @@ -1,12 +1,19 @@ use crate::core::types::Location; + +/// This object represents a venue. #[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize, Clone)] pub struct Venue { + /// Venue location pub location: Location, + /// Name of the venue pub title: String, + /// Address of the venue pub address: String, + /// Foursquare identifier of the venue #[serde(skip_serializing_if = "Option::is_none")] pub foursquare_id: Option, + /// Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) #[serde(skip_serializing_if = "Option::is_none")] - pub foursquare_type: Option, + pub foursquare_type: Option, // TODO: is this enum?... } \ No newline at end of file diff --git a/src/core/types/video.rs b/src/core/types/video.rs index 2df4939f..bb10ac84 100644 --- a/src/core/types/video.rs +++ b/src/core/types/video.rs @@ -1,12 +1,21 @@ use crate::core::types::PhotoSize; + +/// This object represents a video file. #[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize, Clone)] pub struct Video { + /// Identifier for this file pub file_id: String, + /// Video width as defined by sender pub width: u32, + /// Video height as defined by sender pub height: u32, + /// Duration of the video in seconds as defined by sender pub duration: u32, + /// Video thumbnail pub thumb: Option, + /// Mime type of a file as defined by sender pub mime_type: Option, + /// File size pub file_size: Option, }