pub enum Period<'a> {
Repeats(usize),
Cycles(usize),
Walks {
len: usize,
base: usize,
steps: &'a [Steps],
},
}Expand description
How a mapping’s positions read the same items again (Mapping::period).
Variants§
Repeats(usize)
Each item repeats over this many consecutive positions.
Cycles(usize)
Every this many positions read the source’s first items again, in order, as Tiled reads them.
Walks
Every len positions read the same items again, through entries: those that steps reach from base. Reading a cycle in place walks its entries, so a reader gathers one cycle first (tiled_cycle).
Implementations§
Trait Implementations§
impl<'a> Copy for Period<'a>
impl<'a> Eq for Period<'a>
impl<'a> StructuralPartialEq for Period<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Period<'a>
impl<'a> !UnwindSafe for Period<'a>
impl<'a> Forget for Period<'a>
impl<'a> Freeze for Period<'a>
impl<'a> Send for Period<'a>
impl<'a> Sync for Period<'a>
impl<'a> Unpin for Period<'a>
impl<'a> UnsafeUnpin for Period<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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