Struct veloren_common::weather::CompressedWeather
source · pub struct CompressedWeather {
cloud: u8,
rain: u8,
}
Expand description
Weather that’s compressed in order to send it to the client.
Fields§
§cloud: u8
§rain: u8
Implementations§
source§impl CompressedWeather
impl CompressedWeather
pub fn lerp_unclamped(&self, to: &CompressedWeather, t: f32) -> Weather
Trait Implementations§
source§impl Clone for CompressedWeather
impl Clone for CompressedWeather
source§fn clone(&self) -> CompressedWeather
fn clone(&self) -> CompressedWeather
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CompressedWeather
impl Debug for CompressedWeather
source§impl Default for CompressedWeather
impl Default for CompressedWeather
source§fn default() -> CompressedWeather
fn default() -> CompressedWeather
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CompressedWeather
impl<'de> Deserialize<'de> for CompressedWeather
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<CompressedWeather> for Weather
impl From<CompressedWeather> for Weather
source§fn from(weather: CompressedWeather) -> Self
fn from(weather: CompressedWeather) -> Self
Converts to this type from the input type.
source§impl From<Weather> for CompressedWeather
impl From<Weather> for CompressedWeather
source§impl Serialize for CompressedWeather
impl Serialize for CompressedWeather
impl Copy for CompressedWeather
Auto Trait Implementations§
impl RefUnwindSafe for CompressedWeather
impl Send for CompressedWeather
impl Sync for CompressedWeather
impl Unpin for CompressedWeather
impl UnwindSafe for CompressedWeather
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
§impl<C, M> ConvertSaveload<M> for C
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
type Error = Infallible
Error may occur during serialization or deserialization of component
§fn convert_into<F>(
&self,
_: F
) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
fn convert_into<F>( &self, _: F ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
Convert this data type into serializable form (
Data
) using
entity to marker mapping function§fn convert_from<F>(
data: <C as ConvertSaveload<M>>::Data,
_: F
) -> Result<C, <C as ConvertSaveload<M>>::Error>
fn convert_from<F>( data: <C as ConvertSaveload<M>>::Data, _: F ) -> Result<C, <C as ConvertSaveload<M>>::Error>
Convert this data from a deserializable form (
Data
) using
entity to marker mapping function§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.