[−][src]Struct abstio::abst_paths::MapName
A single map is identified using this.
Fields
city: CityName
map: String
The name of the map within the city, in filename-friendly form -- for example, "downtown"
Implementations
impl MapName
[src]
pub fn new(country: &str, city: &str, map: &str) -> MapName
[src]
Create a MapName from a country code, city, and map name.
pub fn from_city(city: &CityName, map: &str) -> MapName
[src]
Create a MapName from a city and map within that city.
pub fn seattle(map: &str) -> MapName
[src]
Convenient constructor for the main city of the game.
pub fn describe(&self) -> String
[src]
Stringify the map name for debug messages. Don't implement std::fmt::Display
, to force
callers to explicitly opt into this description, which could change.
pub fn as_filename(&self) -> String
[src]
Stringify the map name for filenames.
pub fn from_path(path: &str) -> Option<MapName>
[src]
Transforms a path to a map back to a MapName. Returns None
if the input is strange.
pub fn path(&self) -> String
[src]
Returns the filesystem path to this map.
pub fn list_all_maps_in_city(city: &CityName) -> Vec<MapName>
[src]
Returns all maps from one city.
pub fn list_all_maps() -> Vec<MapName>
[src]
Returns all maps from all cities, using system data.
Trait Implementations
impl Clone for MapName
[src]
impl Debug for MapName
[src]
impl<'de> Deserialize<'de> for MapName
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for MapName
[src]
impl Ord for MapName
[src]
fn cmp(&self, other: &MapName) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<MapName> for MapName
[src]
impl PartialOrd<MapName> for MapName
[src]
fn partial_cmp(&self, other: &MapName) -> Option<Ordering>
[src]
fn lt(&self, other: &MapName) -> bool
[src]
fn le(&self, other: &MapName) -> bool
[src]
fn gt(&self, other: &MapName) -> bool
[src]
fn ge(&self, other: &MapName) -> bool
[src]
impl Serialize for MapName
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for MapName
[src]
impl StructuralPartialEq for MapName
[src]
Auto Trait Implementations
impl RefUnwindSafe for MapName
[src]
impl Send for MapName
[src]
impl Sync for MapName
[src]
impl Unpin for MapName
[src]
impl UnwindSafe for MapName
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,