<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `ParkingLot` struct in crate `map_model`."><metaname="keywords"content="rust, rustlang, rust-lang, ParkingLot"><title>map_model::ParkingLot - Rust</title><linkrel="stylesheet"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../light.css"id="themeStyle"><linkrel="stylesheet"type="text/css"href="../dark.css"disabled><linkrel="stylesheet"type="text/css"href="../ayu.css"disabled><scriptsrc="../storage.js"></script><noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="shortcut icon"href="../favicon.ico"><styletype="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><bodyclass="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="sidebar"><divclass="sidebar-menu">☰</div><ahref='../map_model/index.html'><divclass='logo-container rust-logo'><imgsrc='../rust-logo.png'alt='logo'></div></a><pclass='location'>Struct ParkingLot</p><divclass="sidebar-elems"><divclass="block items"><aclass="sidebar-title"href="#fields">Fields</a><divclass="sidebar-links"><ahref="#structfield.aisles">aisles</a><ahref="#structfield.driveway_line">driveway_line</a><ahref="#structfield.driving_pos">driving_pos</a><ahref="#structfield.extra_spots">extra_spots</a><ahref="#structfield.id">id</a><ahref="#structfield.osm_id">osm_id</a><ahref="#structfield.polygon">polygon</a><ahref="#structfield.sidewalk_line">sidewalk_line</a><ahref="#structfield.sidewalk_pos">sidewalk_pos</a><ahref="#structfield.spots">spots</a></div><aclass="sidebar-title"href="#implementations">Methods</a><divclass="sidebar-links"><ahref="#method.capacity">capacity</a></div><aclass="sidebar-title"href="#trait-implementations">Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><ahref="#impl-Serialize">Serialize</a></div><aclass="sidebar-title"href="#synthetic-implementations">Auto Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-RefUnwindSafe">RefUnwindSafe</a><ahref="#impl-Send">Send</a><ahref="#impl-Sync">Sync</a><ahref="#impl-Unpin">Unpin</a><ahref="#impl-UnwindSafe">UnwindSafe</a></div><aclass="sidebar-title"href="#blanket-implementations">Blanket Implementations</a><divclass="sidebar-links"><ahref="#impl-Any">Any</a><ahref="#impl-Borrow%3CT%3E">Borrow<T></a><ahref="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><ahref="#impl-DeserializeOwned">DeserializeOwned</a><ahref="#impl-From%3CT%3E">From<T></a><ahref="#impl-Into%3CU%3E">Into<U></a><ahref="#impl-Same%3CT%3E">Same<T></a><ahref="#impl-TryFrom%3CU%3E">TryFrom<U></a><ahref="#impl-TryInto%3CU%3E">TryInto<U></a><ahref="#impl-VZip%3CV%3E">VZip<V></a></div></div><pclass='location'><ahref='index.html'>map_model</a></p><script>window.sidebarCurrent={name:'ParkingLot',ty:'struct',relpath:''};</script><scriptdefersrc="sidebar-items.js"></script></div></nav><divclass="theme-picker"><buttonid="theme-picker"aria-label="Pick another theme!"><imgsrc="../brush.svg"width="18"alt="Pick another theme!"></button><divid="theme-choices"></div></div><scriptsrc="../theme.js"></script><navclass="sub"><formclass="search-form"><divclass="search-container"><div><selectid="crate-search"><optionvalue="All crates">All crates</option></select><inputclass="search-input"name="search"disabledautocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"></div><spanclass="help-button">?</span>
Fields<ahref='#fields'class='anchor'></a></h2><spanid="structfield.id"class="structfield small-section-header"><ahref="#structfield.id"class="anchor field"></a><code>id: <aclass="struct"href="../map_model/struct.ParkingLotID.html"title="struct map_model::ParkingLotID">ParkingLotID</a></code></span><spanid="structfield.polygon"class="structfield small-section-header"><ahref="#structfield.polygon"class="anchor field"></a><code>polygon: <aclass="struct"href="../geom/polygon/struct.Polygon.html"title="struct geom::polygon::Polygon">Polygon</a></code></span><spanid="structfield.aisles"class="structfield small-section-header"><ahref="#structfield.aisles"class="anchor field"></a><code>aisles: <aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="struct"href="../geom/pt/struct.Pt2D.html"title="struct geom::pt::Pt2D">Pt2D</a>>></code></span><spanid="structfield.osm_id"class="structfield small-section-header"><ahref="#structfield.osm_id"class="anchor field"></a><code>osm_id: <aclass="enum"href="../map_model/osm/enum.OsmID.html"title="enum map_model::osm::OsmID">OsmID</a></code></span><spanid="structfield.spots"class="structfield small-section-header"><ahref="#structfield.spots"class="anchor field"></a><code>spots: <aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><aclass="struct"href="../geom/pt/struct.Pt2D.html"title="struct geom::pt::Pt2D">Pt2D</a>, <aclass="struct"href="../geom/angle/struct.Angle.html"title="struct geom::angle::Angle">Angle</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code></span><divclass='docblock'><p>The middle of the "T", pointing towards the parking aisle</p>
</div><spanid="structfield.extra_spots"class="structfield small-section-header"><ahref="#structfield.extra_spots"class="anchor field"></a><code>extra_spots: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><divclass='docblock'><p>If we can't render all spots (maybe a lot with no aisles or a multi-story garage), still
count the other spots.</p>
</div><spanid="structfield.driveway_line"class="structfield small-section-header"><ahref="#structfield.driveway_line"class="anchor field"></a><code>driveway_line: <aclass="struct"href="../geom/polyline/struct.PolyLine.html"title="struct geom::polyline::PolyLine">PolyLine</a></code></span><divclass='docblock'><p>Goes from the lot to the driving lane</p>
</div><spanid="structfield.driving_pos"class="structfield small-section-header"><ahref="#structfield.driving_pos"class="anchor field"></a><code>driving_pos: <aclass="struct"href="../map_model/struct.Position.html"title="struct map_model::Position">Position</a></code></span><divclass='docblock'><p>Guaranteed to be at least 7m (MAX_CAR_LENGTH + a little buffer) away from both ends of the
lane, to prevent various headaches</p>
</div><spanid="structfield.sidewalk_line"class="structfield small-section-header"><ahref="#structfield.sidewalk_line"class="anchor field"></a><code>sidewalk_line: <aclass="struct"href="../geom/line/struct.Line.html"title="struct geom::line::Line">Line</a></code></span><divclass='docblock'><p>Lot to sidewalk</p>
</div></div><h3id='impl-Same%3CT%3E'class='impl'><codeclass='in-band'>impl<T> Same<T> for T</code><ahref='#impl-Same%3CT%3E'class='anchor'></a></h3><divclass='impl-items'><h4id='associatedtype.Output'class="type"><code>type <ahref='#associatedtype.Output'class="type">Output</a> = T</code></h4><divclass='docblock'><p>Should always be <code>Self</code></p>
</div></div><h3id='impl-TryFrom%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>, </span></code><ahref='#impl-TryFrom%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#607-616'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Error'class="type"><code>type <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error'class="type">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id='method.try_from'class="method hidden"><code>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from'class='fnname'>try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#613-615'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-TryInto%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><ahref='#impl-TryInto%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#593-602'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Error-1'class="type"><code>type <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error'class="type">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id='method.try_into'class="method hidden"><code>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into'class='fnname'>try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#599-601'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>