pub trait HasFaces<'a>: Sized {
type Point: IsPoint;
type Normal: IsUnitVector;
type Face: IsPolygon<'a, Self::Point, Self::Normal>;
type FaceTable: IsGeometryTable<Key = FaceId, Item = Self::Face> + ?Sized + 'a;
// Required methods
fn face_table(&self) -> &Self::FaceTable;
fn face_table_mut(&mut self) -> &mut Self::FaceTable;
fn set_face_table(&mut self, table: &'a mut Self::FaceTable);
// Provided methods
fn face_table_size(&self) -> usize { ... }
fn get_face(&self, id: &FaceId) -> Option<Self::Face> { ... }
fn contains_face(&self, id: &FaceId) -> bool { ... }
fn insert_face(
&mut self,
id: FaceId,
value: Self::Face,
) -> Result<(), ErrorsJSL> { ... }
fn remove_face(&mut self, id: &FaceId) -> Option<Self::Face> { ... }
}Expand description
Provides access to a borrowed polygon-face table.
Required Associated Types§
Sourcetype Normal: IsUnitVector
type Normal: IsUnitVector
Unit normal type used by the stored faces.
Required Methods§
Sourcefn face_table(&self) -> &Self::FaceTable
fn face_table(&self) -> &Self::FaceTable
Returns an immutable reference to the face table.
Sourcefn face_table_mut(&mut self) -> &mut Self::FaceTable
fn face_table_mut(&mut self) -> &mut Self::FaceTable
Returns a mutable reference to the face table.
Sourcefn set_face_table(&mut self, table: &'a mut Self::FaceTable)
fn set_face_table(&mut self, table: &'a mut Self::FaceTable)
Rebinds the implementor to a different borrowed face table.
Provided Methods§
Sourcefn face_table_size(&self) -> usize
fn face_table_size(&self) -> usize
Returns the number of entries in the face table.
Sourcefn contains_face(&self, id: &FaceId) -> bool
fn contains_face(&self, id: &FaceId) -> bool
Returns true if the face table contains id.
Sourcefn insert_face(
&mut self,
id: FaceId,
value: Self::Face,
) -> Result<(), ErrorsJSL>
fn insert_face( &mut self, id: FaceId, value: Self::Face, ) -> Result<(), ErrorsJSL>
Inserts or replaces the face stored at id.
Sourcefn remove_face(&mut self, id: &FaceId) -> Option<Self::Face>
fn remove_face(&mut self, id: &FaceId) -> Option<Self::Face>
Removes and returns the face stored at id, if present.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".