Struct advent_of_code_2021::day_12::Path[−][src]

struct Path {
    visited: usize,
    position: usize,
    can_revisit: bool,
}
Expand description

Represents a path from the start to the node at Path::position.

Fields

visited: usize

bitmap of visited nodes (13 puzzle input nodes - so works on 16+ bit architectures)

position: usize

current node index

can_revisit: bool

flag to track if it has used its one allowed small cave revisit

Implementations

If visiting the provided cave would be valid, return the path with that cave appended, otherwise None

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.