pub struct Map {
pub metadata: MapMetadata,
pub stats: MapStats,
pub description: String,
pub id: String,
pub key: String,
pub name: String,
pub uploader: BeatSaverUser,
pub hash: String,
pub uploaded: DateTime<Utc>,
pub direct_download: String,
pub download: String,
pub cover: String,
}Expand description
Information about a map
Fields§
§metadata: MapMetadataMap metadata
stats: MapStatsMap statistics
description: StringDescription of the map
id: StringID assigned to the map (e.g. 5cff620c48229f7d88fc60df)
Note: Maps are referenced through the key and hash fields, not this one
key: StringKey assigned to the map (e.g. 1234)
Note: This is one of the values used to index maps
name: StringName given to the map
uploader: BeatSaverUserUser who uploaded the map
hash: StringHash of the map Note: This is one of the values used to index maps
uploaded: DateTime<Utc>Timestamp of map upload
direct_download: StringCDN URL to download the map from
Note: This is a relative path, use the following code to get a full url:
use beatsaver_rs::BEATSAVER_URL;
let full_url = BEATSAVER_URL.join(map.direct_download.as_str()).unwrap();download: StringAPI URL to download the map from
Note: This is a relative path, use the following code to get a full url:
use beatsaver_rs::BEATSAVER_URL;
let full_url = BEATSAVER_URL.join(map.download.as_str()).unwrap();cover: StringCover art URL
Note: This is a relative path, use the following code to get a full url:
use beatsaver_rs::BEATSAVER_URL;
let full_url = BEATSAVER_URL.join(map.cover.as_str()).unwrap();Trait Implementations§
Source§impl<'de> Deserialize<'de> for Map
impl<'de> Deserialize<'de> for Map
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Map
Auto Trait Implementations§
impl Freeze for Map
impl RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnsafeUnpin for Map
impl UnwindSafe for Map
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