Struct mapboxgl::MapOptions
source · pub struct MapOptions { /* private fields */ }
Implementations§
source§impl MapOptions
impl MapOptions
pub fn new(access_token: String, container: String) -> MapOptions
pub fn style(self, style: String) -> MapOptions
pub fn projection(self, projection: String) -> MapOptions
pub fn center(self, latlng: LngLat) -> MapOptions
pub fn zoom(self, zoom: f64) -> MapOptions
pub fn build(&self) -> JsValue
Trait Implementations§
source§impl<'de> Deserialize<'de> for MapOptions
impl<'de> Deserialize<'de> for MapOptions
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
source§impl From<MapOptions> for JsValue
impl From<MapOptions> for JsValue
source§fn from(value: MapOptions) -> Self
fn from(value: MapOptions) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for MapOptions
impl FromWasmAbi for MapOptions
source§impl IntoWasmAbi for MapOptions
impl IntoWasmAbi for MapOptions
source§impl LongRefFromWasmAbi for MapOptions
impl LongRefFromWasmAbi for MapOptions
source§impl OptionFromWasmAbi for MapOptions
impl OptionFromWasmAbi for MapOptions
source§impl OptionIntoWasmAbi for MapOptions
impl OptionIntoWasmAbi for MapOptions
source§impl RefFromWasmAbi for MapOptions
impl RefFromWasmAbi for MapOptions
§type Anchor = Ref<'static, MapOptions>
type Anchor = Ref<'static, MapOptions>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.source§impl RefMutFromWasmAbi for MapOptions
impl RefMutFromWasmAbi for MapOptions
source§impl Serialize for MapOptions
impl Serialize for MapOptions
Auto Trait Implementations§
impl RefUnwindSafe for MapOptions
impl !Send for MapOptions
impl !Sync for MapOptions
impl Unpin for MapOptions
impl UnwindSafe for MapOptions
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.