pub struct RasterStyle { /* private fields */ }Expand description
A normalized v3 document. Unknown declared extensions are preserved; inspect validation before execution.
Implementations§
Source§impl Style
impl Style
Sourcepub fn from_json(text: &str) -> Result<Style, Error>
pub fn from_json(text: &str) -> Result<Style, Error>
Parse with the embedded registry, preserving unknown declarations as incomplete.
§Errors
Returns JSON, budget, schema and static-semantic errors; use a custom
SchemaRegistry to register third-party schema resources.
Sourcepub fn from_value(value: Value) -> Result<Style, Error>
pub fn from_value(value: Value) -> Result<Style, Error>
Programmatic values take the same binary64, budget and validation path as raw JSON.
§Errors
Returns the serialization errors or the validation errors of Self::from_json.
Sourcepub fn validation(&self) -> &ValidationReport
pub fn validation(&self) -> &ValidationReport
Borrow the report snapshot captured when this immutable style was constructed. Later schema registrations do not update it; parse again to obtain a fresh report.
Sourcepub fn require_extension_support(&self, supported: &[&str]) -> Result<(), Error>
pub fn require_extension_support(&self, supported: &[&str]) -> Result<(), Error>
Execution support is independent of schema validity and uses exact versioned URLs.
§Errors
Returns E_SCHEMA_UNRESOLVED for incomplete validation and
E_UNSUPPORTED_EXTENSION when the executor’s list omits a declaration.
Sourcepub fn into_value(self) -> Value
pub fn into_value(self) -> Value
Transfer ownership of the normalized document, discarding the report snapshot.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Style
impl<'de> Deserialize<'de> for Style
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Style, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Style, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Serialize for Style
impl Serialize for Style
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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