[−][src]Enum osmpbfreader::objects::OsmObj
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
fn partial_cmp(&self, other: &OsmObj) -> Option<Ordering>
[src]
fn lt(&self, other: &OsmObj) -> bool
[src]
fn le(&self, other: &OsmObj) -> bool
[src]
fn gt(&self, other: &OsmObj) -> bool
[src]
fn ge(&self, other: &OsmObj) -> bool
[src]
impl Serialize for OsmObj
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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]
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>,