pub struct Curve {
pub id: Uuid,
pub name: String,
pub keys: Vec<CurveKey>,
}Fields§
§id: Uuid§name: String§keys: Vec<CurveKey>Implementations§
Source§impl Curve
impl Curve
pub fn set_id(&mut self, id: Uuid)
pub fn id(&self) -> Uuid
pub fn set_name<S: AsRef<str>>(&mut self, name: S)
pub fn name(&self) -> &str
pub fn clear(&mut self)
pub fn is_empty(&self) -> bool
pub fn keys(&self) -> &[CurveKey]
pub fn keys_values(&mut self) -> impl Iterator<Item = &mut f32>
pub fn add_key(&mut self, new_key: CurveKey)
pub fn move_key(&mut self, key_id: usize, location: f32)
pub fn max_location(&self) -> f32
pub fn value_at(&self, location: f32) -> f32
pub fn angle_at(&self, location: f32) -> f32
pub fn bounds(&self) -> Rect<f32>
Trait Implementations§
impl StructuralPartialEq for Curve
Auto Trait Implementations§
impl Freeze for Curve
impl RefUnwindSafe for Curve
impl Send for Curve
impl Sync for Curve
impl Unpin for Curve
impl UnwindSafe for Curve
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.