pub enum PathSegment {
ToPoint {
base: BasePath,
},
TangentialArcTo {
base: BasePath,
center: Point2d,
ccw: bool,
},
Horizontal {
base: BasePath,
x: f64,
},
AngledLineTo {
base: BasePath,
x: Option<f64>,
y: Option<f64>,
},
Base {
base: BasePath,
},
}Expand description
Paths are made up of multiple segments, laid out top-to-tail (i.e. the end of one segment is the start of the next).
Variants§
ToPoint
A path that goes to a point.
TangentialArcTo
A arc that is tangential to the last path segment that goes to a point
Fields
Horizontal
A path that is horizontal.
Fields
AngledLineTo
An angled line to.
Fields
Base
A base path.
Implementations§
Source§impl PathSegment
impl PathSegment
Sourcepub fn segment_kind(&self) -> &'static str
pub fn segment_kind(&self) -> &'static str
What kind of segment?
Trait Implementations§
Source§impl Clone for PathSegment
impl Clone for PathSegment
Source§fn clone(&self) -> PathSegment
fn clone(&self) -> PathSegment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathSegment
impl Debug for PathSegment
Source§impl<'de> Deserialize<'de> for PathSegment
impl<'de> Deserialize<'de> for PathSegment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PathSegment
impl PartialEq for PathSegment
Source§impl Serialize for PathSegment
impl Serialize for PathSegment
Source§impl Value for PathSegment
impl Value for PathSegment
Source§fn into_parts(self) -> Vec<Primitive>
fn into_parts(self) -> Vec<Primitive>
Store the value in memory.
Source§fn from_parts<I>(values: &mut I) -> Result<(Self, usize), MemoryError>
fn from_parts<I>(values: &mut I) -> Result<(Self, usize), MemoryError>
Read the value from memory.
impl StructuralPartialEq for PathSegment
Auto Trait Implementations§
impl Freeze for PathSegment
impl RefUnwindSafe for PathSegment
impl Send for PathSegment
impl Sync for PathSegment
impl Unpin for PathSegment
impl UnwindSafe for PathSegment
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more