pub struct PartialFunctionBuilder<B, O> { /* private fields */ }
Expand description
A builder to create an immutable PartialFunction.
Implementations§
Source§impl<B, O> PartialFunctionBuilder<B, O>
impl<B, O> PartialFunctionBuilder<B, O>
Source§impl<B: PartialOrd, O> PartialFunctionBuilder<B, O>
impl<B: PartialOrd, O> PartialFunctionBuilder<B, O>
Sourcepub fn with(self, lower: B, higher: B, func: Box<dyn Fn(B) -> O>) -> Self
pub fn with(self, lower: B, higher: B, func: Box<dyn Fn(B) -> O>) -> Self
Adds a bounded function bounded between [lower,higher[ of function func.
Sourcepub fn can_insert(&self, lower: &B, higher: &B) -> bool
pub fn can_insert(&self, lower: &B, higher: &B) -> bool
Check if you can safely insert into the function list for the specified bounds.
Sourcepub fn build(self) -> PartialFunction<B, O>
pub fn build(self) -> PartialFunction<B, O>
Builds the PartialFunction from the functions added using with.
Auto Trait Implementations§
impl<B, O> Freeze for PartialFunctionBuilder<B, O>
impl<B, O> !RefUnwindSafe for PartialFunctionBuilder<B, O>
impl<B, O> !Send for PartialFunctionBuilder<B, O>
impl<B, O> !Sync for PartialFunctionBuilder<B, O>
impl<B, O> Unpin for PartialFunctionBuilder<B, O>where
B: Unpin,
impl<B, O> !UnwindSafe for PartialFunctionBuilder<B, O>
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
Mutably borrows from an owned value. Read more