pub struct BackgroundEntry {
pub template_ref: Option<String>,
pub transition: Option<BackgroundTransition>,
pub overrides: Map<String, Value>,
}Expand description
A background entry with optional template reference and transition.
Fields§
§template_ref: Option<String>§transition: Option<BackgroundTransition>§overrides: Map<String, Value>Trait Implementations§
Source§impl Clone for BackgroundEntry
impl Clone for BackgroundEntry
Source§fn clone(&self) -> BackgroundEntry
fn clone(&self) -> BackgroundEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackgroundEntry
impl Debug for BackgroundEntry
Source§impl<'de> Deserialize<'de> for BackgroundEntry
impl<'de> Deserialize<'de> for BackgroundEntry
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>,
Source§impl JsonSchema for BackgroundEntry
Constat #5: no derived JsonSchema here (the #[serde(flatten)] map
makes a fully-accurate derive impossible anyway — the point of flatten
is “any other keys”), which is exactly why Scene/View reached for
#[schemars(skip)] on background in the first place: skip was the
only option with no JsonSchema impl to call. But Scene/View are
also deny_unknown_fields (schemars emits additionalProperties: false
for that), so skipping background didn’t just leave it undocumented —
it made the exported schema declare invalid any scenario that actually
sets scene.background / view.background, which is most of them. This
manual impl describes the real accepted shape ($ref + transition +
“anything else”, matching the flatten) so background can be a real
declared property instead.
impl JsonSchema for BackgroundEntry
Constat #5: no derived JsonSchema here (the #[serde(flatten)] map
makes a fully-accurate derive impossible anyway — the point of flatten
is “any other keys”), which is exactly why Scene/View reached for
#[schemars(skip)] on background in the first place: skip was the
only option with no JsonSchema impl to call. But Scene/View are
also deny_unknown_fields (schemars emits additionalProperties: false
for that), so skipping background didn’t just leave it undocumented —
it made the exported schema declare invalid any scenario that actually
sets scene.background / view.background, which is most of them. This
manual impl describes the real accepted shape ($ref + transition +
“anything else”, matching the flatten) so background can be a real
declared property instead.
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for BackgroundEntry
impl RefUnwindSafe for BackgroundEntry
impl Send for BackgroundEntry
impl Sync for BackgroundEntry
impl Unpin for BackgroundEntry
impl UnsafeUnpin for BackgroundEntry
impl UnwindSafe for BackgroundEntry
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> 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