pub struct StyleSpec {Show 13 fields
pub version: u8,
pub name: Option<String>,
pub metadata: Option<Value>,
pub center: Option<[f64; 2]>,
pub zoom: Option<f64>,
pub bearing: Option<f64>,
pub pitch: Option<f64>,
pub light: Option<Light>,
pub sources: HashMap<String, Source>,
pub sprite: Option<String>,
pub glyphs: Option<String>,
pub transition: Option<Transition>,
pub layers: Vec<Layer>,
}Expand description
Root Mapbox GL Style Specification v8 document.
Fields§
§version: u8Must be 8.
name: Option<String>Human-readable name for the style.
metadata: Option<Value>Arbitrary metadata.
center: Option<[f64; 2]>Default map center [longitude, latitude].
zoom: Option<f64>Default zoom level.
bearing: Option<f64>Default bearing (degrees clockwise from north).
pitch: Option<f64>Default pitch (degrees toward horizon).
light: Option<Light>Global light source settings.
sources: HashMap<String, Source>Data sources available to layers.
sprite: Option<String>URL template for sprite images.
glyphs: Option<String>URL template for glyph PBF files ({fontstack} / {range}).
transition: Option<Transition>Default transition options.
layers: Vec<Layer>Ordered list of rendering layers.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StyleSpec
impl<'de> Deserialize<'de> for StyleSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StyleSpec
impl RefUnwindSafe for StyleSpec
impl Send for StyleSpec
impl Sync for StyleSpec
impl Unpin for StyleSpec
impl UnsafeUnpin for StyleSpec
impl UnwindSafe for StyleSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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