Skip to main content

StyleSourceType

Trait StyleSourceType 

Source
pub trait StyleSourceType:
    Sized
    + Send
    + Sync
    + 'static {
    type Options: Clone + Send + Sync + 'static;

    const INFO: SourceTypeInfo;

    // Provided method
    fn from_json(
        _value: &Convertible<'_>,
        _functions: &Arc<Functions>,
        error: &mut Error,
    ) -> Option<SourceData<Self>> { ... }
}
Expand description

A source type’s style half: its name, what its sources hold and how style JSON describes them.

Required Associated Constants§

Required Associated Types§

Source

type Options: Clone + Send + Sync + 'static

What the style or the API gives: a URL, an inline tileset, GeoJSON options, coordinates.

Provided Methods§

Source

fn from_json( _value: &Convertible<'_>, _functions: &Arc<Functions>, error: &mut Error, ) -> Option<SourceData<Self>>

The data of a source from its style JSON value, whose expressions parse against functions. Only a type whose INFO has from_json is asked.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§