WorldExtensions

Trait WorldExtensions 

Source
pub trait WorldExtensions {
    // Provided methods
    fn set_cvar_deserialize<'a>(
        &mut self,
        cvar: &str,
        value: impl Deserializer<'a>,
    ) -> Result<(), CVarError> { ... }
    fn set_cvar_deserialize_no_change<'a>(
        &mut self,
        cvar: &str,
        value: impl Deserializer<'a>,
    ) -> Result<(), CVarError> { ... }
    fn set_cvar_reflect(
        &mut self,
        cvar: &str,
        value: &dyn Reflect,
    ) -> Result<(), CVarError> { ... }
    fn set_cvar_reflect_no_change(
        &mut self,
        cvar: &str,
        value: &dyn Reflect,
    ) -> Result<(), CVarError> { ... }
    fn set_cvar_with_override(
        &mut self,
        override: &CVarOverride,
    ) -> Result<(), CVarError> { ... }
}
Expand description

Provides extensions to the world for CVars.

Provided Methods§

Source

fn set_cvar_deserialize<'a>( &mut self, cvar: &str, value: impl Deserializer<'a>, ) -> Result<(), CVarError>

Set a CVar on the world through reflection, by deserializing the provided data into it.

Source

fn set_cvar_deserialize_no_change<'a>( &mut self, cvar: &str, value: impl Deserializer<'a>, ) -> Result<(), CVarError>

Set a CVar on the world through reflection by deserializing the provided data into it, without triggering change detection.

Source

fn set_cvar_reflect( &mut self, cvar: &str, value: &dyn Reflect, ) -> Result<(), CVarError>

Set a CVar on the world through reflection

Source

fn set_cvar_reflect_no_change( &mut self, cvar: &str, value: &dyn Reflect, ) -> Result<(), CVarError>

Set a CVar on the world through reflection, without triggering change detection.

Source

fn set_cvar_with_override( &mut self, override: &CVarOverride, ) -> Result<(), CVarError>

Set a CVar on the world using the provided override.

§Remarks

CVar overrides, by design, bypass change detection to look like the default value of the CVar.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl WorldExtensions for World

Implementors§