pub enum StyleSpecError {
Json(Error),
MissingRuntimeSource(String),
RuntimeSourceKindMismatch {
source_id: String,
declared: StyleSourceKind,
actual: StyleSourceKind,
},
MissingLayerSource(String),
InvalidField {
id: String,
field: &'static str,
expected: &'static str,
},
Runtime(StyleError),
}Expand description
Errors produced while parsing or resolving a JSON style specification.
Variants§
Json(Error)
Failed to parse JSON.
MissingRuntimeSource(String)
A style source required by the JSON spec has no runtime binding.
RuntimeSourceKindMismatch
The runtime binding for a source does not match the declared source kind.
Fields
§
declared: StyleSourceKindDeclared spec kind.
§
actual: StyleSourceKindActual bound runtime kind.
MissingLayerSource(String)
A layer references a source but omits the source field.
InvalidField
A JSON field had the wrong shape.
Fields
Runtime(StyleError)
The runtime style document rejected the resolved document.
Trait Implementations§
Source§impl Debug for StyleSpecError
impl Debug for StyleSpecError
Source§impl Display for StyleSpecError
impl Display for StyleSpecError
Source§impl Error for StyleSpecError
impl Error for StyleSpecError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for StyleSpecError
impl From<Error> for StyleSpecError
Source§impl From<StyleError> for StyleSpecError
impl From<StyleError> for StyleSpecError
Source§fn from(value: StyleError) -> Self
fn from(value: StyleError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StyleSpecError
impl !RefUnwindSafe for StyleSpecError
impl Send for StyleSpecError
impl Sync for StyleSpecError
impl Unpin for StyleSpecError
impl UnsafeUnpin for StyleSpecError
impl !UnwindSafe for StyleSpecError
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