Struct LightCoords
#[non_exhaustive]pub struct LightCoords {
pub block: u8,
pub sky: u8,
}Expand description
Block and sky light, each 0..=15, in vanilla’s convention.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.block: u8Block light, 0..=15.
sky: u8Sky light, 0..=15.
Implementations§
§impl LightCoords
impl LightCoords
pub const FULL_BRIGHT: LightCoords
pub const FULL_BRIGHT: LightCoords
Both channels at 15.
pub fn new(block: u8, sky: u8) -> Option<LightCoords>
pub fn new(block: u8, sky: u8) -> Option<LightCoords>
block and sky each in 0..=15, or None.
Trait Implementations§
§impl Clone for LightCoords
impl Clone for LightCoords
§fn clone(&self) -> LightCoords
fn clone(&self) -> LightCoords
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LightCoords
§impl Debug for LightCoords
impl Debug for LightCoords
impl Eq for LightCoords
§impl PartialEq for LightCoords
impl PartialEq for LightCoords
impl StructuralPartialEq for LightCoords
Auto Trait Implementations§
impl Freeze for LightCoords
impl RefUnwindSafe for LightCoords
impl Send for LightCoords
impl Sync for LightCoords
impl Unpin for LightCoords
impl UnsafeUnpin for LightCoords
impl UnwindSafe for LightCoords
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