pub struct OperationRegistry(/* private fields */);Expand description
The operations a program may use, by name.
Implementations§
Source§impl OperationRegistry
impl OperationRegistry
Sourcepub fn with<O: Operation>(self, operation: O) -> GeopResult<Self>
pub fn with<O: Operation>(self, operation: O) -> GeopResult<Self>
Adds operation. Fails if an operation of its name is already there: a
program could not tell the two apart.
Sourcepub fn with_erased(self, operation: Rc<dyn ErasedOperation>) -> GeopResult<Self>
pub fn with_erased(self, operation: Rc<dyn ErasedOperation>) -> GeopResult<Self>
Adds operation, its type erased (see OperationRegistry::with).
pub fn get(&self, name: &str) -> GeopResult<&dyn ErasedOperation>
Trait Implementations§
Source§impl Clone for OperationRegistry
impl Clone for OperationRegistry
Source§fn clone(&self) -> OperationRegistry
fn clone(&self) -> OperationRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for OperationRegistry
impl Default for OperationRegistry
Source§fn default() -> OperationRegistry
fn default() -> OperationRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for OperationRegistry
impl !Send for OperationRegistry
impl !Sync for OperationRegistry
impl !UnwindSafe for OperationRegistry
impl Freeze for OperationRegistry
impl Unpin for OperationRegistry
impl UnsafeUnpin for OperationRegistry
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