pub struct InteriorPathView<M, G>where
M: Reborrow,
M::Target: AsStorage<ArcPayload<G>> + Consistent,
G: Geometry,{ /* private fields */ }Expand description
View of an interior path.
Interior paths are closed paths formed by arcs and their immediate neighboring arcs. In a consistent graph, every arc forms such a path. Such paths may or may not be occupied by faces.
Interior paths have no associated payload and do not directly expose geometry.
See the module documentation for more information about topological views.
Implementations§
Source§impl<'a, M, G> InteriorPathView<&'a mut M, G>where
M: AsStorage<ArcPayload<G>> + Consistent,
G: 'a + Geometry,
impl<'a, M, G> InteriorPathView<&'a mut M, G>where
M: AsStorage<ArcPayload<G>> + Consistent,
G: 'a + Geometry,
Sourcepub fn into_ref(self) -> InteriorPathView<&'a M, G>
pub fn into_ref(self) -> InteriorPathView<&'a M, G>
Converts a mutable view into an immutable view.
This is useful when mutations are not (or no longer) needed and mutual access is desired.
Sourcepub fn with_ref<T, K, F>(self, f: F) -> Either<Result<T, GraphError>, Self>
pub fn with_ref<T, K, F>(self, f: F) -> Either<Result<T, GraphError>, Self>
Reborrows the view and constructs another mutable view from a given key.
This allows for fallible traversals from a mutable view without the
need for direct access to the source MeshGraph. If the given function
emits a key, then that key will be used to convert this view into
another. If no key is emitted, then the original mutable view is
returned.
Source§impl<M, G> InteriorPathView<M, G>where
M: Reborrow,
M::Target: AsStorage<ArcPayload<G>> + Consistent,
G: Geometry,
impl<M, G> InteriorPathView<M, G>where
M: Reborrow,
M::Target: AsStorage<ArcPayload<G>> + Consistent,
G: Geometry,
Source§impl<M, G> InteriorPathView<M, G>where
M: Reborrow,
M::Target: AsStorage<ArcPayload<G>> + AsStorage<VertexPayload<G>> + Consistent,
G: Geometry,
impl<M, G> InteriorPathView<M, G>where
M: Reborrow,
M::Target: AsStorage<ArcPayload<G>> + AsStorage<VertexPayload<G>> + Consistent,
G: Geometry,
Sourcepub fn distance(
&self,
source: Selector<VertexKey>,
destination: Selector<VertexKey>,
) -> Result<usize, GraphError>
pub fn distance( &self, source: Selector<VertexKey>, destination: Selector<VertexKey>, ) -> Result<usize, GraphError>
Gets the distance (number of arcs) between two vertices within the interior path.
Sourcepub fn vertices(
&self,
) -> impl Clone + Iterator<Item = VertexView<&M::Target, G>>
pub fn vertices( &self, ) -> impl Clone + Iterator<Item = VertexView<&M::Target, G>>
Gets an iterator of views over the vertices within the interior path.
Source§impl<M, G> InteriorPathView<M, G>where
M: Reborrow,
M::Target: AsStorage<ArcPayload<G>> + AsStorage<FacePayload<G>> + Consistent,
G: Geometry,
impl<M, G> InteriorPathView<M, G>where
M: Reborrow,
M::Target: AsStorage<ArcPayload<G>> + AsStorage<FacePayload<G>> + Consistent,
G: Geometry,
Source§impl<'a, M, G> InteriorPathView<&'a mut M, G>where
M: AsStorage<VertexPayload<G>> + AsStorage<ArcPayload<G>> + AsStorage<FacePayload<G>> + Default + Mutable<G>,
G: 'a + Geometry,
impl<'a, M, G> InteriorPathView<&'a mut M, G>where
M: AsStorage<VertexPayload<G>> + AsStorage<ArcPayload<G>> + AsStorage<FacePayload<G>> + Default + Mutable<G>,
G: 'a + Geometry,
Sourcepub fn get_or_insert_face(self) -> FaceView<&'a mut M, G>
pub fn get_or_insert_face(self) -> FaceView<&'a mut M, G>
Gets the face of the interior path or inserts a face if one does not already exist.
Returns the inserted face.
Sourcepub fn get_or_insert_face_with<F>(self, f: F) -> FaceView<&'a mut M, G>
pub fn get_or_insert_face_with<F>(self, f: F) -> FaceView<&'a mut M, G>
Gets the face of the interior path or inserts a face if one does not already exist.
If a face is inserted, then the given function is used to get the geometry for the face.
Returns the inserted face.
Auto Trait Implementations§
impl<M, G> Freeze for InteriorPathView<M, G>where
M: Freeze,
impl<M, G> RefUnwindSafe for InteriorPathView<M, G>where
M: RefUnwindSafe,
G: RefUnwindSafe,
impl<M, G> Send for InteriorPathView<M, G>
impl<M, G> Sync for InteriorPathView<M, G>
impl<M, G> Unpin for InteriorPathView<M, G>
impl<M, G> UnwindSafe for InteriorPathView<M, G>where
M: UnwindSafe,
G: UnwindSafe,
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
Source§impl<T> FromGeometry<T> for T
impl<T> FromGeometry<T> for T
fn from_geometry(other: T) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T, U> IntoGeometry<U> for Twhere
U: FromGeometry<T>,
impl<T, U> IntoGeometry<U> for Twhere
U: FromGeometry<T>,
fn into_geometry(self) -> U
Source§impl<T, U> IntoInteriorGeometry<U> for Twhere
U: FromInteriorGeometry<T>,
impl<T, U> IntoInteriorGeometry<U> for Twhere
U: FromInteriorGeometry<T>,
fn into_interior_geometry(self) -> U
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.