[−][src]Struct osmpbf::elements::Way
An OpenStreetMap way element (See OSM wiki).
A way contains an ordered list of node references that can be accessed with the refs
or the
raw_refs
method.
Implementations
impl<'a> Way<'a>
[src]
pub fn id(&self) -> i64
[src]
Returns the way id.
pub fn tags(&self) -> TagIter<'a>ⓘ
[src]
Returns an iterator over the tags of this way (See OSM wiki). A tag is represented as a pair of strings (key and value).
Example
use osmpbf::*; let reader = ElementReader::from_path("tests/test.osm.pbf")?; reader.for_each(|element| { if let Element::Way(way) = element { for (key, value) in way.tags() { println!("key: {}, value: {}", key, value); } } })?;
pub fn info(&self) -> Info<'a>
[src]
Returns additional metadata for this element.
pub fn refs(&self) -> WayRefIter<'a>ⓘNotable traits for WayRefIter<'a>
impl<'a> Iterator for WayRefIter<'a> type Item = i64;
[src]
Notable traits for WayRefIter<'a>
impl<'a> Iterator for WayRefIter<'a> type Item = i64;
Returns an iterator over the references of this way. Each reference should correspond to a node id.
pub fn raw_refs(&self) -> &[i64]
[src]
Returns a slice of delta coded node ids.
pub fn raw_tags(&self) -> RawTagIter<'a>ⓘNotable traits for RawTagIter<'a>
impl<'a> Iterator for RawTagIter<'a> type Item = (u32, u32);
[src]
Notable traits for RawTagIter<'a>
impl<'a> Iterator for RawTagIter<'a> type Item = (u32, u32);
Returns an iterator over the tags of this way
(See OSM wiki).
A tag is represented as a pair of indices (key and value) to the stringtable of the current
PrimitiveBlock
.
pub fn raw_stringtable(&self) -> &[Vec<u8>]
[src]
Returns the raw stringtable. Elements in a PrimitiveBlock
do not store strings
themselves; instead, they just store indices to a common stringtable. By convention, the
contained strings are UTF-8 encoded but it is not safe to assume that (use
std::str::from_utf8
).
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Way<'a>
[src]
impl<'a> Send for Way<'a>
[src]
impl<'a> Sync for Way<'a>
[src]
impl<'a> Unpin for Way<'a>
[src]
impl<'a> UnwindSafe for Way<'a>
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,