pub struct Stairwell {
pub id: String,
pub steps: Vec<StairwellStep>,
pub direction: StairwellDirection,
pub hidden_on_other_layers: bool,
pub custom: Option<String>,
pub canonical: String,
}Expand description
One exit spanning several layers: steps on adjacent layers, used end to end in one move.
Fields§
§id: String§steps: Vec<StairwellStep>Steps in source order, at least two, each on the layer next to the one before it, in one direction, and at most one tile away on each axis.
direction: StairwellDirectionWhether consumers draw only the step on the viewer’s layer.
custom: Option<String>Canonical JSON of the custom object.
canonical: StringCanonical JSON of the stairwell entry.
Implementations§
Source§impl Stairwell
impl Stairwell
Sourcepub fn connects(steps: &[StairwellStep]) -> bool
pub fn connects(steps: &[StairwellStep]) -> bool
Whether steps form a stairwell: at least two, each on the layer
next to the one before it, all going up or all going down, and at
most one tile away from the step before it on each axis.
Sourcepub fn lower_end(&self) -> Option<&StairwellStep>
pub fn lower_end(&self) -> Option<&StairwellStep>
The step on the lowest layer.
Sourcepub fn upper_end(&self) -> Option<&StairwellStep>
pub fn upper_end(&self) -> Option<&StairwellStep>
The step on the highest layer.
Trait Implementations§
impl Eq for Stairwell
impl StructuralPartialEq for Stairwell
Auto Trait Implementations§
impl Forget for Stairwell
impl Freeze for Stairwell
impl Move for Stairwell
impl RefUnwindSafe for Stairwell
impl Send for Stairwell
impl Sync for Stairwell
impl Unpin for Stairwell
impl UnsafeUnpin for Stairwell
impl UnwindSafe for Stairwell
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