Enum osmpbfreader::objects::OsmObj
source · pub enum OsmObj {
Node(Node),
Way(Way),
Relation(Relation),
}
Expand description
An OpenStreetMap object.
Variants§
Implementations§
source§impl OsmObj
impl OsmObj
Returns the tags of the object.
sourcepub fn is_relation(&self) -> bool
pub fn is_relation(&self) -> bool
Returns true
if the object is a relation.
sourcepub fn node(&self) -> Option<&Node>
pub fn node(&self) -> Option<&Node>
Returns a reference to the Node
if self
is a node, otherwise returns None
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for OsmObj
impl<'de> Deserialize<'de> for OsmObj
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for OsmObj
impl PartialEq for OsmObj
source§impl PartialOrd for OsmObj
impl PartialOrd for OsmObj
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl StructuralPartialEq for OsmObj
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more