Trait UpdateShell

Source
pub trait UpdateShell {
    // Required methods
    fn add_faces<T>(
        &self,
        faces: impl IntoIterator<Item = T>,
        core: &mut Core,
    ) -> Self
       where T: Insert<Inserted = Handle<Face>>;
    fn update_face<T, R>(
        &self,
        handle: &Handle<Face>,
        update: impl FnOnce(&Handle<Face>, &mut Core) -> R,
        core: &mut Core,
    ) -> Self
       where T: Insert<Inserted = Handle<Face>>,
             R: IntoIterator<Item = T>;
    fn remove_face(&self, handle: &Handle<Face>) -> Self;
}
Expand description

Update a Shell

Required Methods§

Source

fn add_faces<T>( &self, faces: impl IntoIterator<Item = T>, core: &mut Core, ) -> Self
where T: Insert<Inserted = Handle<Face>>,

Add faces to the shell

Source

fn update_face<T, R>( &self, handle: &Handle<Face>, update: impl FnOnce(&Handle<Face>, &mut Core) -> R, core: &mut Core, ) -> Self
where T: Insert<Inserted = Handle<Face>>, R: IntoIterator<Item = T>,

Update a face of the shell

§Panics

Panics, if the object can’t be found.

Panics, if the update results in multiple handles referencing the same object.

Source

fn remove_face(&self, handle: &Handle<Face>) -> Self

Remove a face from the shell

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§