Struct tiled::GroupLayer
source · pub struct GroupLayer<'map> { /* private fields */ }
Expand description
Implementations§
source§impl<'map> GroupLayer<'map>
impl<'map> GroupLayer<'map>
source§impl<'map> GroupLayer<'map>
impl<'map> GroupLayer<'map>
sourcepub fn layers(&self) -> impl ExactSizeIterator<Item = Layer<'map>> + 'map
pub fn layers(&self) -> impl ExactSizeIterator<Item = Layer<'map>> + 'map
Returns an iterator over the layers present in this group in display order.
Example
use tiled::Layer;
let nested_layers: Vec<Layer> = map
.layers()
.filter_map(|layer| match layer.layer_type() {
tiled::LayerType::Group(layer) => Some(layer),
_ => None,
})
.flat_map(|layer| layer.layers())
.collect();
dbg!(nested_layers);
Trait Implementations§
source§impl<'map> Clone for GroupLayer<'map>
impl<'map> Clone for GroupLayer<'map>
source§fn clone(&self) -> GroupLayer<'map>
fn clone(&self) -> GroupLayer<'map>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'map> Debug for GroupLayer<'map>
impl<'map> Debug for GroupLayer<'map>
source§impl<'map> Deref for GroupLayer<'map>
impl<'map> Deref for GroupLayer<'map>
source§impl<'map> PartialEq for GroupLayer<'map>
impl<'map> PartialEq for GroupLayer<'map>
source§fn eq(&self, other: &GroupLayer<'map>) -> bool
fn eq(&self, other: &GroupLayer<'map>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'map> Copy for GroupLayer<'map>
impl<'map> StructuralPartialEq for GroupLayer<'map>
Auto Trait Implementations§
impl<'map> RefUnwindSafe for GroupLayer<'map>
impl<'map> Send for GroupLayer<'map>
impl<'map> Sync for GroupLayer<'map>
impl<'map> Unpin for GroupLayer<'map>
impl<'map> UnwindSafe for GroupLayer<'map>
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