pub struct CanvasRoutePath {
pub segments: Vec<CanvasRouteSegment>,
}Fields§
§segments: Vec<CanvasRouteSegment>Implementations§
Source§impl CanvasRoutePath
impl CanvasRoutePath
pub fn new(segments: impl IntoIterator<Item = CanvasRouteSegment>) -> Self
pub fn polyline(points: impl IntoIterator<Item = Point<Pixels>>) -> Self
pub fn orthogonal(points: impl IntoIterator<Item = Point<Pixels>>) -> Self
pub fn cubic_bezier( from: Point<Pixels>, control_1: Point<Pixels>, control_2: Point<Pixels>, to: Point<Pixels>, ) -> Self
pub fn is_empty(&self) -> bool
pub fn document_points(&self) -> Vec<Point<Pixels>>
pub fn bounds(&self) -> Option<Bounds<Pixels>>
Trait Implementations§
Source§impl Clone for CanvasRoutePath
impl Clone for CanvasRoutePath
Source§fn clone(&self) -> CanvasRoutePath
fn clone(&self) -> CanvasRoutePath
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CanvasRoutePath
impl Debug for CanvasRoutePath
Source§impl Default for CanvasRoutePath
impl Default for CanvasRoutePath
Source§fn default() -> CanvasRoutePath
fn default() -> CanvasRoutePath
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CanvasRoutePath
impl<'de> Deserialize<'de> for CanvasRoutePath
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 CanvasRoutePath
impl PartialEq for CanvasRoutePath
Source§fn eq(&self, other: &CanvasRoutePath) -> bool
fn eq(&self, other: &CanvasRoutePath) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CanvasRoutePath
impl Serialize for CanvasRoutePath
impl StructuralPartialEq for CanvasRoutePath
Auto Trait Implementations§
impl Freeze for CanvasRoutePath
impl RefUnwindSafe for CanvasRoutePath
impl Send for CanvasRoutePath
impl Sync for CanvasRoutePath
impl Unpin for CanvasRoutePath
impl UnsafeUnpin for CanvasRoutePath
impl UnwindSafe for CanvasRoutePath
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().