[−][src]Struct partial_function::PartialFunction
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,
B: Unpin,
impl<B, O> !UnwindSafe for PartialFunction<B, O>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,