pub struct Grammar {
pub title: Option<String>,
pub output: OutputSpec,
pub sections: Vec<(Section, Vec<Def>)>,
pub draw: Vec<Draw>,
pub compose: Compose,
pub paint: Vec<Paint>,
pub views: Vec<View>,
}Fields§
§title: Option<String>A name for the profile, carried with it when shared; nothing draws it.
output: OutputSpec§sections: Vec<(Section, Vec<Def>)>Sections in the order they were written, each with its defs.
draw: Vec<Draw>§compose: Compose§paint: Vec<Paint>A screen’s layers, bottom first (paint(...)): what covers the grid
when the output is a screen (output.screen).
views: Vec<View>Other places drawn into rectangles of this page (view(...)), under
the page’s own groups. Each is a whole graph with its own output.
Implementations§
Source§impl Grammar
impl Grammar
Sourcepub fn terrains(&self) -> Vec<&Terrain>
pub fn terrains(&self) -> Vec<&Terrain>
The tools_terrain defs, in file order: what the host reads the
elevation for.
Sourcepub fn burins(&self) -> Vec<&Burin>
pub fn burins(&self) -> Vec<&Burin>
The tools_burin defs: whole burin documents the engine draws.
Sourcepub fn draws_terrain(&self) -> bool
pub fn draws_terrain(&self) -> bool
Whether any def draws the elevation — terrain, or a burin document. What turns the terrain fetch on.
pub fn defs(&self, section: Section) -> &[Def]
Sourcepub fn reached(self) -> Grammar
pub fn reached(self) -> Grammar
This graph with only what it shows: the defs that no draw, paint,
mask or clip reads, directly or through other defs, left out, so
nothing is fetched or computed for them (terrain no layer reads asks
for no elevation, a tile layer none reads for no tiles). Views keep
their own graphs whole.
pub fn find(&self, name: &Name) -> Option<&Def>
Sourcepub fn module(&self, module: &str) -> Option<&Def>
pub fn module(&self, module: &str) -> Option<&Def>
The def holding module_<module>, if the profile calls one.
Sourcepub fn osm_keys(&self) -> Vec<String>
pub fn osm_keys(&self) -> Vec<String>
Every OSM key the profile can select on: what Overpass must fetch.
Modules read tags the profile never names (module_roads needs
highway), so they contribute their keys too, unless they read a
feature set of their own (from). Empty: the profile needs no
Overpass at all.
Sourcepub fn tile_selectors(&self) -> Vec<String>
pub fn tile_selectors(&self) -> Vec<String>
Every tiles_select item: what to read from the vector tiles.
Sourcepub fn draws_ocean(&self) -> bool
pub fn draws_ocean(&self) -> bool
Whether the profile reads open-sea polygons from the vector tiles.
Sourcepub fn datasets(&self) -> Vec<String>
pub fn datasets(&self) -> Vec<String>
Every data_select source, a URL or a file path, in order: the
GeoJSON the host must read and pass as Inputs::data.
Sourcepub fn source_files(&self) -> Vec<String>
pub fn source_files(&self) -> Vec<String>
SVG files named by a fill source, for the host to read.
Trait Implementations§
impl StructuralPartialEq for Grammar
Auto Trait Implementations§
impl Forget for Grammar
impl Freeze for Grammarwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Warp>: Freeze,
PhantomData<(Section, Vec<Def>)>: Freeze,
PhantomData<Draw>: Freeze,
PhantomData<Id>: Freeze,
PhantomData<(String, Mask)>: Freeze,
*const LeafNode<Id, Clip> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(Id, Clip)>>: Freeze,
PhantomData<Name>: Freeze,
PhantomData<OptimizeStep>: Freeze,
PhantomData<Paint>: Freeze,
PhantomData<View>: Freeze,
impl Move for Grammar
impl RefUnwindSafe for Grammar
impl Send for Grammarwhere
RawVecInner: Send,
RawTable<usize>: Send,
BoxRaw<Op>: Send,
NodeRef<Owned, String, Value, LeafOrInternal>: Send,
BoxRaw<(String, Value)>: Send,
NodeRef<Owned, String, Name, LeafOrInternal>: Send,
BoxRaw<(String, Name)>: Send,
NodeRef<Owned, String, RoadClassSpec, LeafOrInternal>: Send,
BoxRaw<(String, RoadClassSpec)>: Send,
NodeRef<Owned, Id, Clip, LeafOrInternal>: Send,
BoxRaw<(Id, Clip)>: Send,
&'static str: Send,
BoxRaw<Expr>: Send,
Arc<Mutex<HashMap<String, Option<Look>>>>: Send,
BoxRaw<Grammar>: Send,
impl Sync for Grammarwhere
RawVecInner: Sync,
RawTable<usize>: Sync,
BoxRaw<Op>: Sync,
NodeRef<Owned, String, Value, LeafOrInternal>: Sync,
BoxRaw<(String, Value)>: Sync,
NodeRef<Owned, String, Name, LeafOrInternal>: Sync,
BoxRaw<(String, Name)>: Sync,
NodeRef<Owned, String, RoadClassSpec, LeafOrInternal>: Sync,
BoxRaw<(String, RoadClassSpec)>: Sync,
NodeRef<Owned, Id, Clip, LeafOrInternal>: Sync,
BoxRaw<(Id, Clip)>: Sync,
BoxRaw<Expr>: Sync,
Arc<Mutex<HashMap<String, Option<Look>>>>: Sync,
BoxRaw<Grammar>: Sync,
impl Unpin for Grammarwhere
*const u8 is !null: Unpin,
Box<Op>: Unpin,
*const LeafNode<String, Value> is !null: Unpin,
Box<(String, Value)>: Unpin,
*const LeafNode<String, Name> is !null: Unpin,
Box<(String, Name)>: Unpin,
*const LeafNode<String, RoadClassSpec> is !null: Unpin,
Box<(String, RoadClassSpec)>: Unpin,
*const LeafNode<Id, Clip> is !null: Unpin,
Box<(Id, Clip)>: Unpin,
&'static str: Unpin,
Box<Expr>: Unpin,
Arc<Mutex<HashMap<String, Option<Look>>>>: Unpin,
Box<Grammar>: Unpin,
impl UnsafeUnpin for Grammarwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Warp>: UnsafeUnpin,
PhantomData<(Section, Vec<Def>)>: UnsafeUnpin,
PhantomData<Draw>: UnsafeUnpin,
PhantomData<Id>: UnsafeUnpin,
PhantomData<(String, Mask)>: UnsafeUnpin,
*const LeafNode<Id, Clip> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(Id, Clip)>>: UnsafeUnpin,
PhantomData<Name>: UnsafeUnpin,
PhantomData<OptimizeStep>: UnsafeUnpin,
PhantomData<Paint>: UnsafeUnpin,
PhantomData<View>: UnsafeUnpin,
impl UnwindSafe for Grammarwhere
RawVecInner: UnwindSafe,
NonNull<u8>: UnwindSafe,
BoxRaw<Op>: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BTreeMap<String, Name>: UnwindSafe,
BTreeMap<String, RoadClassSpec>: UnwindSafe,
BTreeMap<Id, Clip>: UnwindSafe,
&'static str: UnwindSafe,
BoxRaw<Expr>: UnwindSafe,
Arc<Mutex<HashMap<String, Option<Look>>>>: UnwindSafe,
BoxRaw<Grammar>: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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