Struct EdgeView

Source
pub struct EdgeView<M, G>
where M: Reborrow, M::Target: AsStorage<EdgePayload<G>>, G: Geometry,
{ /* private fields */ }
Expand description

View of an edge.

Provides traversals, queries, and mutations related to edges in a graph. See the module documentation for more information about topological views.

Implementations§

Source§

impl<'a, M, G> EdgeView<&'a mut M, G>
where M: 'a + AsStorage<EdgePayload<G>> + AsStorageMut<EdgePayload<G>>, G: 'a + Geometry,

Source

pub fn into_orphan(self) -> OrphanEdgeView<'a, G>

Converts a mutable view into an orphan view.

Source

pub fn into_ref(self) -> EdgeView<&'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.

Source

pub fn with_ref<T, K, F>(self, f: F) -> Either<Result<T, GraphError>, Self>
where T: FromKeyedSource<(K, &'a mut M)>, F: FnOnce(EdgeView<&M, G>) -> Option<K>,

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> EdgeView<M, G>
where M: Reborrow, M::Target: AsStorage<EdgePayload<G>>, G: Geometry,

Source

pub fn key(&self) -> EdgeKey

Gets the key for the edge.

Source§

impl<M, G> EdgeView<M, G>
where M: Reborrow, M::Target: AsStorage<ArcPayload<G>> + AsStorage<EdgePayload<G>> + Consistent, G: Geometry,

Source

pub fn into_arc(self) -> ArcView<M, G>

Source

pub fn arc(&self) -> ArcView<&M::Target, G>

Source

pub fn is_disjoint_edge(&self) -> bool

Source§

impl<M, G> EdgeView<M, G>
where M: Reborrow, M::Target: AsStorage<ArcPayload<G>> + AsStorage<EdgePayload<G>> + AsStorage<FacePayload<G>> + AsStorage<VertexPayload<G>> + Consistent, G: EdgeMidpoint + Geometry,

Source

pub fn midpoint(&self) -> G::Midpoint

Trait Implementations§

Source§

impl<M, G> Clone for EdgeView<M, G>
where M: Clone + Reborrow, M::Target: AsStorage<EdgePayload<G>>, G: Geometry,

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<M, G> Deref for EdgeView<M, G>
where M: Reborrow, M::Target: AsStorage<EdgePayload<G>>, G: Geometry,

Source§

type Target = EdgePayload<G>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<M, G> DerefMut for EdgeView<M, G>
where M: Reborrow + ReborrowMut, M::Target: AsStorage<EdgePayload<G>> + AsStorageMut<EdgePayload<G>>, G: Geometry,

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<M, G> Copy for EdgeView<M, G>
where M: Copy + Reborrow, M::Target: AsStorage<EdgePayload<G>>, G: Geometry,

Auto Trait Implementations§

§

impl<M, G> Freeze for EdgeView<M, G>
where M: Freeze,

§

impl<M, G> RefUnwindSafe for EdgeView<M, G>

§

impl<M, G> Send for EdgeView<M, G>
where M: Send, G: Send,

§

impl<M, G> Sync for EdgeView<M, G>
where M: Sync, G: Sync,

§

impl<M, G> Unpin for EdgeView<M, G>
where M: Unpin, G: Unpin,

§

impl<M, G> UnwindSafe for EdgeView<M, G>
where M: UnwindSafe, G: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromGeometry<T> for T

Source§

fn from_geometry(other: T) -> T

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T, U> IntoGeometry<U> for T
where U: FromGeometry<T>,

Source§

fn into_geometry(self) -> U

Source§

impl<T, U> IntoInteriorGeometry<U> for T

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

unsafe fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.