Struct advent_solutions::advent2017::day13::Firewall
[−]
[src]
pub struct Firewall(_);
By studying the firewall briefly, you are able to record (in your puzzle
input) the depth of each layer and the range of the scanning area
for the scanner within it, written as depth: range. Each layer has a
thickness of exactly 1. A layer at depth 0 begins immediately inside
the firewall; a layer at depth 1 would start immediately after that.
For example, suppose you've recorded the following:
0: 3
1: 2
4: 4
6: 4
This means that there is a layer immediately inside the firewall (with
range 3), a second layer immediately after that (with range 2), a
third layer which begins at depth 4 (with range 4), and a fourth
layer which begins at depth 6 (also with range 4). Visually, it might
look like this:
0 1 2 3 4 5 6
[ ] [ ] ... ... [ ] ... [ ]
[ ] [ ] [ ] [ ]
[ ] [ ] [ ]
[ ] [ ]
Methods
impl Firewall[src]
Trait Implementations
impl Clone for Firewall[src]
fn clone(&self) -> Firewall[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq for Firewall[src]
fn eq(&self, __arg_0: &Firewall) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Firewall) -> bool[src]
This method tests for !=.
impl Eq for Firewall[src]
impl Debug for Firewall[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Hash for Firewall[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)[src]
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl Index<usize> for Firewall[src]
type Output = Option<Layer>
The returned type after indexing.
fn index(&self, i: usize) -> &Self::Output[src]
Performs the indexing (container[index]) operation.