Struct abstio::abst_paths::MapName
source · [−]Expand description
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
sourceimpl MapName
impl MapName
sourcepub fn new(country: &str, city: &str, map: &str) -> MapName
pub fn new(country: &str, city: &str, map: &str) -> MapName
Create a MapName from a country code, city, and map name.
pub fn blank() -> Self
sourcepub fn from_city(city: &CityName, map: &str) -> MapName
pub fn from_city(city: &CityName, map: &str) -> MapName
Create a MapName from a city and map within that city.
sourcepub fn describe(&self) -> String
pub fn describe(&self) -> String
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.
sourcepub fn as_filename(&self) -> String
pub fn as_filename(&self) -> String
Stringify the map name for filenames.
sourcepub fn from_path(path: &str) -> Option<MapName>
pub fn from_path(path: &str) -> Option<MapName>
Transforms a path to a map back to a MapName. Returns None
if the input is strange.
sourcefn list_all_maps_in_city_locally(city: &CityName) -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn list_all_maps_in_city_locally(city: &CityName) -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns all maps from one city that’re available locally.
sourcepub fn list_all_maps_locally() -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn list_all_maps_locally() -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns all maps from all cities available locally.
sourcefn list_all_maps_from_manifest(manifest: &Manifest) -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn list_all_maps_from_manifest(manifest: &Manifest) -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns all maps from all cities based on the manifest of available files.
sourcepub fn list_all_maps_merged(manifest: &Manifest) -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn list_all_maps_merged(manifest: &Manifest) -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns all maps from all cities either available locally or based on the manifest of available files.
sourcefn list_all_maps_in_city_from_manifest(
city: &CityName,
manifest: &Manifest
) -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn list_all_maps_in_city_from_manifest(
city: &CityName,
manifest: &Manifest
) -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns all maps from one city based on the manifest of available files.
sourcepub fn list_all_maps_in_city_merged(
city: &CityName,
manifest: &Manifest
) -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn list_all_maps_in_city_merged(
city: &CityName,
manifest: &Manifest
) -> Vec<MapName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns all maps from one city that’re available either locally or according to the manifest.
sourcepub fn to_data_pack_name(&self) -> String
pub fn to_data_pack_name(&self) -> String
Returns the string to opt into runtime or input files for DataPacks.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for MapName
impl<'de> Deserialize<'de> for MapName
sourcefn 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
sourceimpl Ord for MapName
impl Ord for MapName
sourceimpl PartialOrd<MapName> for MapName
impl PartialOrd<MapName> for MapName
sourcefn partial_cmp(&self, other: &MapName) -> Option<Ordering>
fn partial_cmp(&self, other: &MapName) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl CloneableAny for MapName
impl Eq for MapName
impl StructuralEq for MapName
impl StructuralPartialEq for MapName
Auto Trait Implementations
impl RefUnwindSafe for MapName
impl Send for MapName
impl Sync for MapName
impl Unpin for MapName
impl UnwindSafe for MapName
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CloneableImpl for T where
T: 'static + CloneableAny + Clone,
impl<T> CloneableImpl for T where
T: 'static + CloneableAny + Clone,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more