pub trait Mesh {
type Node;
type Id: RemoteMessage;
type Sliced<'a>: Mesh<Node = Self::Node> + 'a
where Self: 'a;
// Required methods
fn shape(&self) -> &Shape;
fn select<R: Into<Range>>(
&self,
label: &str,
range: R,
) -> Result<Self::Sliced<'_>, ShapeError>;
fn get(&self, index: usize) -> Option<Self::Node>;
fn id(&self) -> Self::Id;
// Provided method
fn iter(&self) -> MeshIter<'_, Self> ⓘ { ... }
}
Expand description
A mesh of nodes, organized into the topology described by its shape (see Shape
).
Required Associated Types§
Sourcetype Id: RemoteMessage
type Id: RemoteMessage
The type of identifiers for this mesh.
Required Methods§
Sourcefn select<R: Into<Range>>(
&self,
label: &str,
range: R,
) -> Result<Self::Sliced<'_>, ShapeError>
fn select<R: Into<Range>>( &self, label: &str, range: R, ) -> Result<Self::Sliced<'_>, ShapeError>
Sub-slice this mesh, specifying the included ranges for the dimension with the labeled name.
Provided Methods§
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.