pub struct FaceConditions(/* private fields */);Expand description
The FaceCondition of each of the six outer faces, indexed by
Face (default: all PEC).
use ems::engine::{FaceCondition, FaceConditions};
use ems::Face;
let mut f = FaceConditions::default().with(Face::ZMin, FaceCondition::Pmc);
f[Face::XMax] = FaceCondition::Pmc;
assert_eq!(f[Face::ZMin], FaceCondition::Pmc);
assert_eq!(f[Face::YMin], FaceCondition::Pec);Implementations§
Source§impl FaceConditions
impl FaceConditions
Sourcepub const fn all(c: FaceCondition) -> Self
pub const fn all(c: FaceCondition) -> Self
The same condition c on all six faces.
Sourcepub const fn from_array(faces: [FaceCondition; 6]) -> Self
pub const fn from_array(faces: [FaceCondition; 6]) -> Self
From one condition per face in Face::ALL order
(x_min, x_max, y_min, y_max, z_min, z_max).
Sourcepub const fn to_array(self) -> [FaceCondition; 6]
pub const fn to_array(self) -> [FaceCondition; 6]
The conditions in Face::ALL order.
Sourcepub const fn with(self, face: Face, c: FaceCondition) -> Self
pub const fn with(self, face: Face, c: FaceCondition) -> Self
Returns self with the condition of face set to c.
Sourcepub fn set(&mut self, face: Face, c: FaceCondition)
pub fn set(&mut self, face: Face, c: FaceCondition)
Sets the condition of face.
Sourcepub const fn get(&self, face: Face) -> FaceCondition
pub const fn get(&self, face: Face) -> FaceCondition
The condition of face.
Trait Implementations§
Source§impl Clone for FaceConditions
impl Clone for FaceConditions
impl Copy for FaceConditions
Source§impl Debug for FaceConditions
impl Debug for FaceConditions
Source§impl Default for FaceConditions
impl Default for FaceConditions
impl Eq for FaceConditions
Source§impl From<[FaceCondition; 6]> for FaceConditions
impl From<[FaceCondition; 6]> for FaceConditions
Source§fn from(faces: [FaceCondition; 6]) -> Self
fn from(faces: [FaceCondition; 6]) -> Self
Source§impl Index<Face> for FaceConditions
impl Index<Face> for FaceConditions
Source§type Output = FaceCondition
type Output = FaceCondition
The returned type after indexing.
Source§impl IndexMut<Face> for FaceConditions
impl IndexMut<Face> for FaceConditions
Source§impl PartialEq for FaceConditions
impl PartialEq for FaceConditions
impl StructuralPartialEq for FaceConditions
Auto Trait Implementations§
impl Freeze for FaceConditions
impl RefUnwindSafe for FaceConditions
impl Send for FaceConditions
impl Sync for FaceConditions
impl Unpin for FaceConditions
impl UnsafeUnpin for FaceConditions
impl UnwindSafe for FaceConditions
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