Struct osmpbfreader::objects::Tags
[−]
[src]
pub struct Tags(_);
Tags represents the features of the objects. See the OpenStreetMap wiki page about tags for more information.
Methods
impl Tags
[src]
fn new() -> Tags
Creates a new, empty Tags
object.
fn contains(&self, key: &str, value: &str) -> bool
Returns if contains the tag (key, value)
.
Methods from Deref<Target=FlatMap<String, String>>
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);
fn reserve(&mut self, additional: usize)
fn reserve_exact(&mut self, additional: usize)
fn shrink_to_fit(&mut self)
fn len(&self) -> usize
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());
fn iter(&'r self) -> Iter<'r, K, V>
fn iter_mut(&mut self) -> IterMut<K, V>
fn values_mut(&mut self) -> ValuesMut<K, V>
fn keys(&'a self) -> Keys<'a, K, V>
fn values(&'a self) -> Values<'a, K, V>
fn clear(&mut self)
fn insert(&mut self, key: K, v: V) -> Option<V>
fn append(&mut self, other: &mut FlatMap<K, V>)
fn split_off(&mut self, key: &K) -> FlatMap<K, V>
fn get<Q>(&self, q: &Q) -> Option<&V> where K: Borrow<Q>, Q: Ord + ?Sized
fn contains_key<Q>(&self, k: &Q) -> bool where K: Borrow<Q>, Q: Ord + ?Sized
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());
fn entry(&mut self, key: K) -> Entry<K, V>
fn remove<Q>(&mut self, q: &Q) -> Option<V> where K: Borrow<Q>, Q: Ord + ?Sized
Trait Implementations
impl Debug for Tags
[src]
impl Clone for Tags
[src]
fn clone(&self) -> Tags
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Tags
[src]
fn eq(&self, __arg_0: &Tags) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Tags) -> bool
This method tests for !=
.
impl Eq for Tags
[src]
impl PartialOrd for Tags
[src]
fn partial_cmp(&self, __arg_0: &Tags) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Tags) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Tags) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Tags) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Tags) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Tags
[src]
fn cmp(&self, __arg_0: &Tags) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl Hash for Tags
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl Deref for Tags
[src]
type Target = FlatMap<String, String>
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value