Trait fj_core::operations::update::UpdateShell
source · pub trait UpdateShell {
// Required methods
fn add_faces(&self, faces: impl IntoIterator<Item = Handle<Face>>) -> Self;
fn update_face(
&self,
handle: &Handle<Face>,
update: impl FnOnce(&Handle<Face>) -> Handle<Face>
) -> Self;
fn replace_face<const N: usize>(
&self,
handle: &Handle<Face>,
replace: impl FnOnce(&Handle<Face>) -> [Handle<Face>; N]
) -> Self;
fn remove_face(&self, handle: &Handle<Face>) -> Self;
}Expand description
Update a Shell
Required Methods§
sourcefn add_faces(&self, faces: impl IntoIterator<Item = Handle<Face>>) -> Self
fn add_faces(&self, faces: impl IntoIterator<Item = Handle<Face>>) -> Self
Add faces to the shell
sourcefn update_face(
&self,
handle: &Handle<Face>,
update: impl FnOnce(&Handle<Face>) -> Handle<Face>
) -> Self
fn update_face( &self, handle: &Handle<Face>, update: impl FnOnce(&Handle<Face>) -> Handle<Face> ) -> Self
Update a face of the shell
Panics
Panics, if the object can’t be found.
Panics, if the update results in a duplicate object.
sourcefn replace_face<const N: usize>(
&self,
handle: &Handle<Face>,
replace: impl FnOnce(&Handle<Face>) -> [Handle<Face>; N]
) -> Self
fn replace_face<const N: usize>( &self, handle: &Handle<Face>, replace: impl FnOnce(&Handle<Face>) -> [Handle<Face>; N] ) -> Self
Replace a face of the shell
This is a more general version of UpdateShell::update_face which can
replace a single face with multiple others.
Panics
Panics, if the object can’t be found.
Panics, if the update results in a duplicate object.
sourcefn remove_face(&self, handle: &Handle<Face>) -> Self
fn remove_face(&self, handle: &Handle<Face>) -> Self
Remove a face from the shell
Object Safety§
This trait is not object safe.