[−][src]Struct osmpbfreader::objects::Tags
Tags represents the features of the objects. See the OpenStreetMap wiki page about tags for more information.
Methods
impl Tags
[src]
pub fn new() -> Tags
[src]
Creates a new, empty Tags
object.
pub fn contains(&self, key: &str, value: &str) -> bool
[src]
Returns if it contains the a tag with the given key
and value
.
Methods from Deref<Target = FlatMap<String, String>>
pub fn capacity(&self) -> usize
[src]
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)
[src]
pub fn reserve_exact(&mut self, additional: usize)
[src]
pub fn shrink_to_fit(&mut self)
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
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 self) -> Iter<'r, K, V>
[src]
pub fn iter_mut(&mut self) -> IterMut<K, V>
[src]
pub fn values_mut(&mut self) -> ValuesMut<K, V>
[src]
pub fn keys(&'a self) -> Keys<'a, K, V>
[src]
pub fn values(&'a self) -> Values<'a, K, V>
[src]
pub fn clear(&mut self)
[src]
pub fn insert(&mut self, key: K, v: V) -> Option<V>
[src]
pub fn append(&mut self, other: &mut FlatMap<K, V>)
[src]
pub fn split_off(&mut self, key: &K) -> FlatMap<K, V>
[src]
pub fn get<Q>(&self, q: &Q) -> Option<&V> where
K: Borrow<Q>,
Q: Ord + ?Sized,
[src]
K: Borrow<Q>,
Q: Ord + ?Sized,
pub fn contains_key<Q>(&self, k: &Q) -> bool where
K: Borrow<Q>,
Q: Ord + ?Sized,
[src]
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,
[src]
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>
[src]
pub fn remove<Q>(&mut self, q: &Q) -> Option<V> where
K: Borrow<Q>,
Q: Ord + ?Sized,
[src]
K: Borrow<Q>,
Q: Ord + ?Sized,
Trait Implementations
impl Clone for Tags
[src]
impl Debug for Tags
[src]
impl Default for Tags
[src]
impl Deref for Tags
[src]
type Target = FlatMap<String, String>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl DerefMut for Tags
[src]
impl<'de> Deserialize<'de> for Tags
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Tags
[src]
impl FromIterator<(String, String)> for Tags
[src]
impl Hash for Tags
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Tags
[src]
fn cmp(&self, other: &Tags) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Tags> for Tags
[src]
impl PartialOrd<Tags> for Tags
[src]
fn partial_cmp(&self, other: &Tags) -> Option<Ordering>
[src]
fn lt(&self, other: &Tags) -> bool
[src]
fn le(&self, other: &Tags) -> bool
[src]
fn gt(&self, other: &Tags) -> bool
[src]
fn ge(&self, other: &Tags) -> bool
[src]
impl Serialize for Tags
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Tags
[src]
impl StructuralPartialEq for Tags
[src]
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
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: 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.
fn to_owned(&self) -> T
[src]
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.
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>,