Struct Func

Source
pub struct Func<F, T> { /* private fields */ }
Expand description

Func is an aggregator which doesn’t need a data backing, for use with small types

Implementations§

Source§

impl<T, F: Fn(&[T]) -> T> Func<F, T>

Source

pub fn new(f: F) -> Self

Create a new small-typed aggregator

Trait Implementations§

Source§

impl<F: Fn(&[bool]) -> bool + 'static> Aggregator for Func<F, bool>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Fn(&[i16]) -> i16 + 'static> Aggregator for Func<F, i16>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Fn(&[i32]) -> i32 + 'static> Aggregator for Func<F, i32>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Fn(&[i64]) -> i64 + 'static> Aggregator for Func<F, i64>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Fn(&[i8]) -> i8 + 'static> Aggregator for Func<F, i8>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Fn(&[isize]) -> isize + 'static> Aggregator for Func<F, isize>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Fn(&[u16]) -> u16 + 'static> Aggregator for Func<F, u16>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Fn(&[u32]) -> u32 + 'static> Aggregator for Func<F, u32>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Fn(&[u64]) -> u64 + 'static> Aggregator for Func<F, u64>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Fn(&[u8]) -> u8 + 'static> Aggregator for Func<F, u8>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Fn(&[usize]) -> usize + 'static> Aggregator for Func<F, usize>

Source§

fn aggregate(&self, big_ks: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping
Source§

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems
Source§

impl<F: Clone, T: Clone> Clone for Func<F, T>

Source§

fn clone(&self) -> Func<F, T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<F, T> Freeze for Func<F, T>

§

impl<F, T> RefUnwindSafe for Func<F, T>

§

impl<F, T> !Send for Func<F, T>

§

impl<F, T> !Sync for Func<F, T>

§

impl<F, T> Unpin for Func<F, T>
where T: Unpin,

§

impl<F, T> UnwindSafe for Func<F, T>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.