pub struct Threads(/* private fields */);Expand description
A part’s cosmetic threads, by name: the value of its target threads,
which every step that records one revises.
Implementations§
Source§impl Threads
impl Threads
Sourcepub fn add(
&mut self,
name: impl Into<String>,
thread: CosmeticThread,
) -> GeopResult<()>
pub fn add( &mut self, name: impl Into<String>, thread: CosmeticThread, ) -> GeopResult<()>
Records thread under name. Fails, leaving the threads as they
are, if there is a thread of that name already.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&str, &CosmeticThread)>
pub fn iter(&self) -> impl Iterator<Item = (&str, &CosmeticThread)>
Every cosmetic thread, by name.
Sourcepub fn get(&self, name: &str) -> GeopResult<&CosmeticThread>
pub fn get(&self, name: &str) -> GeopResult<&CosmeticThread>
The cosmetic thread name.
Source§impl Threads
impl Threads
Sourcepub fn drawn(&self, step: &str) -> GeopResult<Vec<ViewAnnotation>>
pub fn drawn(&self, step: &str) -> GeopResult<Vec<ViewAnnotation>>
What a viewer draws of each thread the step step recorded: its
name, its designation and its helix as a polyline.
Trait Implementations§
Source§impl HasElements<Threads> for Threads
impl HasElements<Threads> for Threads
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
The name of the one target of this type a part has, if it has only
one — the topology, say: a reference into it is saved as the
element’s name alone.
Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
What the target reads as where no step made it, if it reads as
anything then — the datums every part starts with. None by default:
reading it fails.
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
Whether the target named
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.impl StructuralPartialEq for Threads
Source§impl Target for Threads
Every step that records threads adds to them.
impl Target for Threads
Every step that records threads adds to them.
Source§const CHAIN: bool = true
const CHAIN: bool = true
Whether several steps may produce a target of this type, each from
what the steps before left (see
crate::reader::Reader::previous):
the model, the datums, the parameters’ values, the listings — what
a program accumulates. A target that is not a chain — a sketch, a
placed part — has one producer, and a second is an error naming
both.Auto Trait Implementations§
impl Freeze for Threads
impl RefUnwindSafe for Threads
impl Send for Threads
impl Sync for Threads
impl Unpin for Threads
impl UnsafeUnpin for Threads
impl UnwindSafe for Threads
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