Map

Struct Map 

Source
pub struct Map<P, F>(/* private fields */);
Expand description

A property that maps the value of a wrapped property with a function.

This struct is created by PropGet::map.

Trait Implementations§

Source§

impl<K, P, F, O> PropGet<K> for Map<P, F>
where P: PropGet<K>, F: Fn(P::Output) -> O,

Source§

type Output = O

Source§

fn get(&self, k: K) -> Self::Output

Returns the value associated with key.
Source§

fn map<F, O>(self, fun: F) -> Map<Self, F>
where Self: Sized, F: Fn(Self::Output) -> O,

Creates a mapped property that maps each property value using fun.
Source§

fn by_ref(&self) -> &Self

Returns a reference to this property.

Auto Trait Implementations§

§

impl<P, F> Freeze for Map<P, F>
where P: Freeze, F: Freeze,

§

impl<P, F> RefUnwindSafe for Map<P, F>

§

impl<P, F> Send for Map<P, F>
where P: Send, F: Send,

§

impl<P, F> Sync for Map<P, F>
where P: Sync, F: Sync,

§

impl<P, F> Unpin for Map<P, F>
where P: Unpin, F: Unpin,

§

impl<P, F> UnwindSafe for Map<P, F>
where P: UnwindSafe, F: 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoOwned<T> for T

Source§

fn into_owned(self) -> T

Source§

impl<G> Sets for G

Source§

fn vertices_complement<I>(&self, vertices: I) -> VerticesComplement<'_, Self>

Source§

fn edges_complement<I>(&self, edges: I) -> EdgesComplement<'_, Self>
where Self: EdgeList + WithEdgeProp<bool>, I: IntoIterator, I::Item: IntoOwned<Edge<Self>>,

Source§

fn independent_vertex_set_from_iter<I>( &self, vertices: I, ) -> IndependentVertexSetFromIter<'_, Self, I::IntoIter>

Source§

fn is_independent_vertex_set<I>(&self, vertices: I) -> bool

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.
Source§

impl<P, G, T> EdgePropGet<G, T> for P
where G: WithEdge, P: PropGet<<G as WithEdge>::Edge, Output = T>,

Source§

impl<P, G, T> VertexPropGet<G, T> for P
where G: WithVertex, P: PropGet<<G as WithVertex>::Vertex, Output = T>,