pub struct CubeDim {
pub x: u32,
pub y: u32,
pub z: u32,
}
Fields§
§x: u32
§y: u32
§z: u32
Implementations§
Source§impl CubeDim
impl CubeDim
Sourcepub const fn new_single() -> Self
pub const fn new_single() -> Self
Create a new cube dim with x = y = z = 1.
Sourcepub const fn new_2d(x: u32, y: u32) -> Self
pub const fn new_2d(x: u32, y: u32) -> Self
Create a new cube dim with the given x and y, and z = 1.
Sourcepub const fn new_3d(x: u32, y: u32, z: u32) -> Self
pub const fn new_3d(x: u32, y: u32, z: u32) -> Self
Create a new cube dim with the given x, y and z. This is equivalent to the new function.
pub const fn num_elems(&self) -> u32
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CubeDim
impl<'de> Deserialize<'de> for CubeDim
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
impl Copy for CubeDim
impl Eq for CubeDim
impl StructuralPartialEq for CubeDim
Auto Trait Implementations§
impl Freeze for CubeDim
impl RefUnwindSafe for CubeDim
impl Send for CubeDim
impl Sync for CubeDim
impl Unpin for CubeDim
impl UnwindSafe for CubeDim
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