Struct synth::envelope::Envelope [] [src]

pub struct Envelope {
    pub points: Vec<Point>,
}

An alias for the envelope to be used used for amp and freq interpolation.

Fields

points: Vec<Point>

Trait Implementations

impl Encodable for Envelope
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Decodable for Envelope
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Envelope, __D::Error>

impl Debug for Envelope
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for Envelope
[src]

fn clone(&self) -> Envelope

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl FromIterator<Point> for Envelope
[src]

fn from_iter<T>(iter: T) -> Self where T: IntoIterator<Item=Point>

Creates a value from an iterator. Read more

impl From<Vec<Point>> for Envelope
[src]

fn from(points: Vec<Point>) -> Self

Performs the conversion.

impl<'a> Trait<'a, Point> for Envelope
[src]

type Points = Iter<'a, Point>

An iterator yielding references to Ps.

fn points(&'a self) -> Self::Points

An iterator yielding the Points of the Envelope.

fn point_idx_before<X, Y>(&'a self, x: X) -> Option<usize> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

The index of the Point that comes directly before the given x.

fn point_idx_on_or_before<X, Y>(&'a self, x: X) -> Option<usize> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

The index of the Point that either lands on or comes directly before the given x.

fn point_idx_after<X, Y>(&'a self, x: X) -> Option<usize> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

The index of the Point that comes directly after the given x.

fn point_idx_on_or_after<X, Y>(&'a self, x: X) -> Option<usize> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

The index of the Point that comes directly after the given x.

fn point_before<X, Y>(&'a self, x: X) -> Option<&'a P> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference to the first point that comes before the given x.

fn point_on_or_before<X, Y>(&'a self, x: X) -> Option<&'a P> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference to the first point that is equal to or comes before the given x.

fn point_before_with_idx<X, Y>(&'a self, x: X) -> Option<(usize, &'a P)> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference to the first point that comes before the given x along with its index.

fn point_on_or_before_with_idx<X, Y>(&'a self, x: X) -> Option<(usize, &'a P)> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference to the first point that is equal to or comes before the given x along with its index. Read more

fn point_after<X, Y>(&'a self, x: X) -> Option<&'a P> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference to the first point that comes after the given x.

fn point_on_or_after<X, Y>(&'a self, x: X) -> Option<&'a P> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference to the first point that is equal to or comes after the given x.

fn point_after_with_idx<X, Y>(&'a self, x: X) -> Option<(usize, &'a P)> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference to the first point that comes after the given x along with its index.

fn point_on_or_after_with_idx<X, Y>(&'a self, x: X) -> Option<(usize, &'a P)> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference to the first point that is equal to or comes after the given x along with its index. Read more

fn point_at<X, Y>(&'a self, x: X) -> Option<&'a P> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference to the first point lying directly on the given x if there is one.

fn point_at_with_idx<X, Y>(&'a self, x: X) -> Option<(usize, &'a P)> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference to the first point (along with it's index) lying directly on the given x if there is one. Read more

fn surrounding_points<X, Y>(&'a self, x: X) -> (Option<&'a P>, Option<&'a P>) where P: Point<X, Y> + 'a, X: Copy + PartialOrd<X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

The points that lie on either side of the given x. Read more

fn closest_point<X, Y>(&'a self, x: X) -> Option<&'a P> where P: Point<X, Y> + 'a, X: Copy + PartialOrd<X> + Sub<X, Output=X> + 'a, Y: Spatial + 'a, Y::Scalar: Float, Y::Scalar: 'a

A reference point that is closest to the given x if there is one. Read more

fn y<X, Y>(&'a self, x: X) -> Option<Y> where P: Point<X, Y> + 'a, X: PartialOrd<X> + 'a, Y: Spatial + PartialEq<Y> + 'a, Y::Scalar: Float, Y::Scalar: 'a

Return y for the given x. Read more