pub struct PathType {
pub kind: SplineType,
pub degree: Option<NonZeroI32>,
}Expand description
The type of a SliderPath’s segment.
Fields§
§kind: SplineType§degree: Option<NonZeroI32>Implementations§
Source§impl PathType
impl PathType
pub const CATMULL: Self
pub const BEZIER: Self
pub const LINEAR: Self
pub const PERFECT_CURVE: Self
Sourcepub const fn new(kind: SplineType) -> Self
pub const fn new(kind: SplineType) -> Self
Initialize a new PathType without a degree.
Sourcepub const fn new_b_spline(degree: NonZeroI32) -> Self
pub const fn new_b_spline(degree: NonZeroI32) -> Self
Initialize a new BSpline PathType.
Sourcepub fn new_from_str(input: &str) -> Self
pub fn new_from_str(input: &str) -> Self
Parse a string into a PathType.
The string should be of the form "B<optional integer>" | "L" | "P"
(without the <>). Otherwise, a catmull path type is returned.
Trait Implementations§
impl Copy for PathType
impl Eq for PathType
impl StructuralPartialEq for PathType
Auto Trait Implementations§
impl Freeze for PathType
impl RefUnwindSafe for PathType
impl Send for PathType
impl Sync for PathType
impl Unpin for PathType
impl UnwindSafe for PathType
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