Struct partial_function::PartialFunctionBuilder [−][src]
pub struct PartialFunctionBuilder<B, O> where
B: PartialOrd, { /* fields omitted */ }
A builder to create an immutable PartialFunction.
Methods
impl<B, O> PartialFunctionBuilder<B, O> where
B: PartialOrd,
[src]
impl<B, O> PartialFunctionBuilder<B, O> where
B: PartialOrd,
pub fn new() -> Self
[src]
pub fn new() -> Self
Creates a new PartialFunctionBuilder.
pub fn with(self, lower: B, higher: B, func: fn(_: B) -> O) -> Self
[src]
pub fn with(self, lower: B, higher: B, func: fn(_: B) -> O) -> Self
Adds a bounded function bounded between [lower,higher[ of function func.
pub fn can_insert(&self, lower: &B, higher: &B) -> bool
[src]
pub fn can_insert(&self, lower: &B, higher: &B) -> bool
Check if you can safely insert into the function list for the specified bounds.
pub fn build(self) -> PartialFunction<B, O>
[src]
pub fn build(self) -> PartialFunction<B, O>
Builds the PartialFunction from the functions added using with.
Auto Trait Implementations
impl<B, O> Send for PartialFunctionBuilder<B, O> where
B: Send,
impl<B, O> Send for PartialFunctionBuilder<B, O> where
B: Send,
impl<B, O> Sync for PartialFunctionBuilder<B, O> where
B: Sync,
impl<B, O> Sync for PartialFunctionBuilder<B, O> where
B: Sync,