pub struct Object {
pub header: Header,
pub payload: Payload,
}
Expand description
Polygon object.
Fields§
§header: Header
Header.
payload: Payload
Payload.
Implementations§
source§impl Object
impl Object
Short named accessors and mutators
sourcepub fn elem_mut<Q: AsRef<str>>(
&mut self,
name: Q,
) -> Option<ElementEntryMut<'_>>
pub fn elem_mut<Q: AsRef<str>>( &mut self, name: Q, ) -> Option<ElementEntryMut<'_>>
Get a mutable element by name.
sourcepub fn elems(&self) -> impl Iterator<Item = ElementEntry<'_>>
pub fn elems(&self) -> impl Iterator<Item = ElementEntry<'_>>
Return an iterator over elements.
sourcepub fn elems_mut(&mut self) -> impl Iterator<Item = ElementEntryMut<'_>>
pub fn elems_mut(&mut self) -> impl Iterator<Item = ElementEntryMut<'_>>
Return an iterator over mutable elements.
sourcepub fn elem_prop<'e, 'p: 'e, Q: AsRef<str>>(
&'p self,
element_name: Q,
property_name: Q,
) -> Option<PropertyEntry<'p>>
pub fn elem_prop<'e, 'p: 'e, Q: AsRef<str>>( &'p self, element_name: Q, property_name: Q, ) -> Option<PropertyEntry<'p>>
Get a property of an element.
sourcepub fn elem_prop_mut<'e, 'p: 'e, Q: AsRef<str>>(
&'p mut self,
element_name: Q,
property_name: Q,
) -> Option<PropertyEntryMut<'p>>
pub fn elem_prop_mut<'e, 'p: 'e, Q: AsRef<str>>( &'p mut self, element_name: Q, property_name: Q, ) -> Option<PropertyEntryMut<'p>>
Get a mutable property of an element.
source§impl Object
impl Object
Long named accessors and mutators
sourcepub fn get_element<Q: AsRef<str>>(&self, name: Q) -> Option<ElementEntry<'_>>
pub fn get_element<Q: AsRef<str>>(&self, name: Q) -> Option<ElementEntry<'_>>
Get an element by name.
sourcepub fn get_mut_element<Q: AsRef<str>>(
&mut self,
name: Q,
) -> Option<ElementEntryMut<'_>>
pub fn get_mut_element<Q: AsRef<str>>( &mut self, name: Q, ) -> Option<ElementEntryMut<'_>>
Get a mutable element by name.
sourcepub fn get_property_of_element<'e, 'p: 'e, Q: AsRef<str>>(
&'p self,
element_name: Q,
property_name: Q,
) -> Option<PropertyEntry<'p>>
pub fn get_property_of_element<'e, 'p: 'e, Q: AsRef<str>>( &'p self, element_name: Q, property_name: Q, ) -> Option<PropertyEntry<'p>>
Get a property of an element.
sourcepub fn get_mut_property_of_element<'e, 'p: 'e, Q: AsRef<str>>(
&'p mut self,
element_name: Q,
property_name: Q,
) -> Option<PropertyEntryMut<'p>>
pub fn get_mut_property_of_element<'e, 'p: 'e, Q: AsRef<str>>( &'p mut self, element_name: Q, property_name: Q, ) -> Option<PropertyEntryMut<'p>>
Get a mutable property of an element.
sourcepub fn iter_elements(&self) -> impl Iterator<Item = ElementEntry<'_>>
pub fn iter_elements(&self) -> impl Iterator<Item = ElementEntry<'_>>
Return an iterator over elements.
sourcepub fn iter_mut_elements(&mut self) -> impl Iterator<Item = ElementEntryMut<'_>>
pub fn iter_mut_elements(&mut self) -> impl Iterator<Item = ElementEntryMut<'_>>
Return an iterator over mutable elements.
Trait Implementations§
impl Eq for Object
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more