pub struct SheetAnchor {
pub view: String,
pub kind: String,
pub solid: String,
pub vertex: u64,
pub edge: String,
pub fraction: f64,
}Expand description
A parsed anchor reference.
Fields§
§view: StringThe PLACED VIEW’s id (SV2) — which projection the point belongs to.
kind: String§solid: StringThe solid the geometry belongs to.
vertex: u64A display vertex’s topology id (VERTEX).
edge: String§fraction: f64Arc-length fraction along the edge (EDGE): 0 and 1 are its ends,
0.5 its midpoint.
Implementations§
Source§impl SheetAnchor
impl SheetAnchor
pub fn vertex(view: &str, solid: &str, topo_id: u64) -> SheetAnchor
pub fn edge(view: &str, solid: &str, edge: &str, fraction: f64) -> SheetAnchor
pub fn circle(view: &str, solid: &str, edge: &str) -> SheetAnchor
Sourcepub fn to_ref(&self) -> String
pub fn to_ref(&self) -> String
The reference string: {placement}:{kind}:{solid}#{entity}, with an
edge’s fraction after an @.
The two separators are chosen so the parse cannot be ambiguous: a
kernel edge name carries | and [n] but never a # or an @, and
the placement id and the kind are this module’s own vocabulary.
Trait Implementations§
Source§impl Clone for SheetAnchor
impl Clone for SheetAnchor
Source§impl Debug for SheetAnchor
impl Debug for SheetAnchor
Source§impl PartialEq for SheetAnchor
impl PartialEq for SheetAnchor
impl StructuralPartialEq for SheetAnchor
Auto Trait Implementations§
impl Freeze for SheetAnchor
impl RefUnwindSafe for SheetAnchor
impl Send for SheetAnchor
impl Sync for SheetAnchor
impl Unpin for SheetAnchor
impl UnsafeUnpin for SheetAnchor
impl UnwindSafe for SheetAnchor
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,
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