[][src]Struct osmpbfreader::objects::Tags

pub struct 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]

pub fn contains_key<Q>(&self, k: &Q) -> bool where
    K: Borrow<Q>,
    Q: Ord + ?Sized
[src]

pub fn get_mut<Q>(&mut self, q: &Q) -> Option<&mut V> where
    K: Borrow<Q>,
    Q: Ord + ?Sized
[src]

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]

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.

impl DerefMut for Tags[src]

impl<'de> Deserialize<'de> for Tags[src]

impl Eq for Tags[src]

impl FromIterator<(String, String)> for Tags[src]

impl Hash for Tags[src]

impl Ord for Tags[src]

impl PartialEq<Tags> for Tags[src]

impl PartialOrd<Tags> for Tags[src]

impl Serialize for Tags[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.