pub trait HasVertices<'a>: Sized {
type Vertex: IsPoint;
type VertexTable: IsGeometryTable<Key = PointId, Item = Self::Vertex> + ?Sized + 'a;
// Required methods
fn vertex_table(&self) -> &Self::VertexTable;
fn vertex_table_mut(&mut self) -> &mut Self::VertexTable;
fn set_vertex_table(&mut self, table: &'a mut Self::VertexTable);
// Provided methods
fn vertex_table_size(&self) -> usize { ... }
fn get_vertex(&self, id: &PointId) -> Option<Self::Vertex> { ... }
fn contains_vertex(&self, id: &PointId) -> bool { ... }
fn insert_vertex(
&mut self,
id: PointId,
value: Self::Vertex,
) -> Result<(), ErrorsJSL> { ... }
fn remove_vertex(&mut self, id: &PointId) -> Option<Self::Vertex> { ... }
}Expand description
Provides access to a borrowed point table.
Required Associated Types§
Sourcetype VertexTable: IsGeometryTable<Key = PointId, Item = Self::Vertex> + ?Sized + 'a
type VertexTable: IsGeometryTable<Key = PointId, Item = Self::Vertex> + ?Sized + 'a
Borrowed point-table type.
Required Methods§
Sourcefn vertex_table(&self) -> &Self::VertexTable
fn vertex_table(&self) -> &Self::VertexTable
Returns an immutable reference to the vertex table.
Sourcefn vertex_table_mut(&mut self) -> &mut Self::VertexTable
fn vertex_table_mut(&mut self) -> &mut Self::VertexTable
Returns a mutable reference to the vertex table.
Sourcefn set_vertex_table(&mut self, table: &'a mut Self::VertexTable)
fn set_vertex_table(&mut self, table: &'a mut Self::VertexTable)
Rebinds the implementor to a different borrowed vertex table.
Provided Methods§
Sourcefn vertex_table_size(&self) -> usize
fn vertex_table_size(&self) -> usize
Returns the number of entries in the vertex table.
Sourcefn get_vertex(&self, id: &PointId) -> Option<Self::Vertex>
fn get_vertex(&self, id: &PointId) -> Option<Self::Vertex>
Returns the vertex stored at id.
Sourcefn contains_vertex(&self, id: &PointId) -> bool
fn contains_vertex(&self, id: &PointId) -> bool
Returns true if the vertex table contains id.
Sourcefn insert_vertex(
&mut self,
id: PointId,
value: Self::Vertex,
) -> Result<(), ErrorsJSL>
fn insert_vertex( &mut self, id: PointId, value: Self::Vertex, ) -> Result<(), ErrorsJSL>
Inserts or replaces the vertex stored at id.
Sourcefn remove_vertex(&mut self, id: &PointId) -> Option<Self::Vertex>
fn remove_vertex(&mut self, id: &PointId) -> Option<Self::Vertex>
Removes and returns the vertex stored at id, if present.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".