Skip to main content

FallibleMap

Trait FallibleMap 

Source
pub trait FallibleMap<V> {
    // Required methods
    fn try_get(&self, p: PointId) -> Result<&[V], MeshSieveError>;
    fn try_get_mut(&mut self, p: PointId) -> Result<&mut [V], MeshSieveError>;
}
Expand description

Fallible read/write access to per-point slices.

Required Methods§

Source

fn try_get(&self, p: PointId) -> Result<&[V], MeshSieveError>

Immutable access to p’s slice.

Source

fn try_get_mut(&mut self, p: PointId) -> Result<&mut [V], MeshSieveError>

Mutable access to p’s slice.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, V, S> FallibleMap<V> for ReadOnlyMap<'a, V, S>
where S: Storage<V>,

Source§

impl<V, S> FallibleMap<V> for ConstrainedSection<V, S>
where S: Storage<V>,

Source§

impl<V, S> FallibleMap<V> for Section<V, S>
where S: Storage<V>,

Implement FallibleMap for Section<V>.