Struct osmpbfreader::objects::Tags
source · pub struct Tags(/* private fields */);
Expand description
Tags represents the features of the objects. See the OpenStreetMap wiki page about tags for more information.
Implementations§
Methods from Deref<Target = FlatMap<String, String>>§
sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Returns the number of elements the VecMap
can hold without
reallocating.
Examples
use flat_map::FlatMap;
let map: FlatMap<String, String> = FlatMap::with_capacity(10);
assert!(map.capacity() >= 10);
pub fn reserve(&mut self, additional: usize)
pub fn reserve_exact(&mut self, additional: usize)
pub fn shrink_to_fit(&mut self)
pub fn len(&self) -> usize
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Return true if the map contains no elements.
Examples
use flat_map::FlatMap;
let mut a = FlatMap::new();
assert!(a.is_empty());
a.insert("1", "a");
assert!(!a.is_empty());
pub fn iter<'r>(&'r self) -> Iter<'r, K, V>
pub fn iter_mut(&mut self) -> IterMut<'_, K, V>
pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>
pub fn keys<'a>(&'a self) -> Keys<'a, K, V>
pub fn values<'a>(&'a self) -> Values<'a, K, V>
pub fn clear(&mut self)
pub fn retain<F>(&mut self, f: F)where F: FnMut(&K, &V) -> bool,
pub fn insert(&mut self, key: K, v: V) -> Option<V>
pub fn append(&mut self, other: &mut FlatMap<K, V>)
pub fn split_off(&mut self, key: &K) -> FlatMap<K, V>
pub fn get<Q>(&self, q: &Q) -> Option<&V>where K: Borrow<Q>, Q: Ord + ?Sized,
pub fn contains_key<Q>(&self, k: &Q) -> boolwhere K: Borrow<Q>, Q: Ord + ?Sized,
sourcepub fn get_mut<Q>(&mut self, q: &Q) -> Option<&mut V>where
K: Borrow<Q>,
Q: Ord + ?Sized,
pub fn get_mut<Q>(&mut self, q: &Q) -> Option<&mut V>where K: Borrow<Q>, Q: Ord + ?Sized,
Return Option<&mut V>.
Example
use flat_map::FlatMap;
let mut m = FlatMap::new();
m.insert(1, "foo".to_string());
m.get_mut(&1).unwrap().push_str("bar");
assert_eq!("foobar", m.get_mut(&1).unwrap());
pub fn entry(&mut self, key: K) -> Entry<'_, K, V>
pub fn remove<Q>(&mut self, q: &Q) -> Option<V>where K: Borrow<Q>, Q: Ord + ?Sized,
Trait Implementations§
source§impl Deref for Tags
impl Deref for Tags
§type Target = FlatMap<SmartString<LazyCompact>, SmartString<LazyCompact>>
type Target = FlatMap<SmartString<LazyCompact>, SmartString<LazyCompact>>
The resulting type after dereferencing.
source§impl<'de> Deserialize<'de> for Tags
impl<'de> Deserialize<'de> for Tags
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
source§impl FromIterator<(SmartString<LazyCompact>, SmartString<LazyCompact>)> for Tags
impl FromIterator<(SmartString<LazyCompact>, SmartString<LazyCompact>)> for Tags
source§impl Ord for Tags
impl Ord for Tags
source§impl PartialEq for Tags
impl PartialEq for Tags
source§impl PartialOrd for Tags
impl PartialOrd for Tags
1.0.0 · source§fn 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 moreimpl Eq for Tags
impl StructuralEq for Tags
impl StructuralPartialEq for Tags
Auto Trait Implementations§
impl RefUnwindSafe for Tags
impl Send for Tags
impl Sync for Tags
impl Unpin for Tags
impl UnwindSafe for Tags
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