[][src]Struct partial_function::PartialFunction

pub struct PartialFunction<B, O> { /* fields omitted */ }

Define a functions defined by multiple functions parts. See BoundedFunction. Uses bounds as [lower,higher], except in the case of a lower bound overlapping a higher bound. In this case, the lower bound always take precedence.

Implementations

impl<B: PartialOrd, O> PartialFunction<B, O>[src]

pub fn new() -> PartialFunctionBuilder<B, O>[src]

Creates a new PartialFunctionBuilder

pub fn eval(&self, x: B) -> Option<O>[src]

Evaluates the partial function. Returns None if no function is defined.

Auto Trait Implementations

impl<B, O> !RefUnwindSafe for PartialFunction<B, O>

impl<B, O> !Send for PartialFunction<B, O>

impl<B, O> !Sync for PartialFunction<B, O>

impl<B, O> Unpin for PartialFunction<B, O> where
    B: Unpin

impl<B, O> !UnwindSafe for PartialFunction<B, O>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.