[][src]Enum osmpbfreader::objects::OsmObj

pub enum OsmObj {
    Node(Node),
    Way(Way),
    Relation(Relation),
}

An OpenStreetMap object.

Variants

Node(Node)

A node

Way(Way)

A way

Relation(Relation)

A relation

Methods

impl OsmObj[src]

pub fn tags(&self) -> &Tags[src]

Returns the tags of the object.

pub fn id(&self) -> OsmId[src]

Returns the id of the object.

pub fn is_node(&self) -> bool[src]

Returns true if the object is a node.

pub fn is_way(&self) -> bool[src]

Returns true if the object is a way.

pub fn is_relation(&self) -> bool[src]

Returns true if the object is a relation.

pub fn node(&self) -> Option<&Node>[src]

Returns a reference to the Node if self is a node, otherwise returns None.

pub fn way(&self) -> Option<&Way>[src]

Returns a reference to the Way if self is a way, otherwise returns None.

pub fn relation(&self) -> Option<&Relation>[src]

Returns a reference to the Relation if self is a relation, otherwise returns None.

Trait Implementations

impl Clone for OsmObj[src]

impl Debug for OsmObj[src]

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

impl From<Node> for OsmObj[src]

impl From<Relation> for OsmObj[src]

impl From<Way> for OsmObj[src]

impl PartialEq<OsmObj> for OsmObj[src]

impl PartialOrd<OsmObj> for OsmObj[src]

impl Serialize for OsmObj[src]

impl StructuralPartialEq for OsmObj[src]

Auto Trait Implementations

impl RefUnwindSafe for OsmObj

impl Send for OsmObj

impl Sync for OsmObj

impl Unpin for OsmObj

impl UnwindSafe for OsmObj

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.