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 duplicate 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>
impl<'map> Copy for GroupLayer<'map>
impl<'map> StructuralPartialEq for GroupLayer<'map>
Auto Trait Implementations§
impl<'map> Freeze for GroupLayer<'map>
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