pub trait IServerCompositionLight {
// Required methods
fn light_props(&self) -> &ServerCompositionLightProps;
fn light_state(&self) -> &ServerLightState;
fn is_disposed(&self) -> bool;
fn coordinate_space(&self) -> Option<Rc<ServerCompositionVisual>>;
fn source(&self) -> LightSource;
// Provided method
fn target_of(
&self,
visual: &ServerCompositionVisual,
) -> Option<Rc<ServerCompositionVisual>> { ... }
}Expand description
What every server-side light has: the properties of CompositionLight,
where it shines from and what it lights.
Required Methods§
Sourcefn light_props(&self) -> &ServerCompositionLightProps
fn light_props(&self) -> &ServerCompositionLightProps
The properties of CompositionLight.
Sourcefn light_state(&self) -> &ServerLightState
fn light_state(&self) -> &ServerLightState
The bookkeeping of what the light lit.
fn is_disposed(&self) -> bool
Sourcefn coordinate_space(&self) -> Option<Rc<ServerCompositionVisual>>
fn coordinate_space(&self) -> Option<Rc<ServerCompositionVisual>>
The visual whose coordinates the light is in; None for the targeted
visual (and for an ambient light, which has no position).
Sourcefn source(&self) -> LightSource
fn source(&self) -> LightSource
The light in its coordinate space.
Provided Methods§
Sourcefn target_of(
&self,
visual: &ServerCompositionVisual,
) -> Option<Rc<ServerCompositionVisual>>
fn target_of( &self, visual: &ServerCompositionVisual, ) -> Option<Rc<ServerCompositionVisual>>
Whether visual is lit by the light: in the subtree of a target and
not in the subtree of an exclusion (an exclusion that is also a
target is excluded). The target, if it is.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".