#[non_exhaustive]pub enum AnchorCount {
Fixed(usize),
Open {
min: usize,
},
Freehand,
}Expand description
How a drawing is created.
§Examples
use ferrochart_core::drawing::AnchorCount;
assert_eq!(AnchorCount::Fixed(3).min(), 3);
assert_eq!(AnchorCount::Open { min: 2 }.min(), 2);
assert_eq!(AnchorCount::Freehand.min(), 2);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fixed(usize)
One click per anchor, n clicks (tools with more anchors add them in
DrawingTool::finish).
Open
One click per anchor until a double click or Enter, at least min
anchors (e.g. a path).
Freehand
Press, drag and release: an anchor every 3 CSS px of movement (e.g. a brush), at least 2.
Implementations§
Trait Implementations§
Source§impl Clone for AnchorCount
impl Clone for AnchorCount
impl Copy for AnchorCount
Source§impl Debug for AnchorCount
impl Debug for AnchorCount
impl Eq for AnchorCount
Source§impl PartialEq for AnchorCount
impl PartialEq for AnchorCount
impl StructuralPartialEq for AnchorCount
Auto Trait Implementations§
impl Forget for AnchorCount
impl Freeze for AnchorCount
impl Move for AnchorCount
impl RefUnwindSafe for AnchorCount
impl Send for AnchorCount
impl Sync for AnchorCount
impl Unpin for AnchorCount
impl UnsafeUnpin for AnchorCount
impl UnwindSafe for AnchorCount
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