Eraser

Struct Eraser 

Source
pub struct Eraser { /* private fields */ }
Expand description

An eraser is a tool intended for erasing.

This is represented in the physical design of the tool. Typically an eraser is on the back end of a Stylus to emulate a traditional pencil + eraser setup.

Erasers never exist on their own, they are part of a Tool::StylusWithEraser and always coupled with a corresponding Stylus.

Trait Implementations§

Source§

impl Clone for Eraser

Source§

fn clone(&self) -> Eraser

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Eraser

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Eraser

Source§

fn eq(&self, other: &Eraser) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToolFeatures for Eraser

Source§

fn name(&self) -> &str

The name of this eraser given by the manufacturer, e.g. “Grip Pen”. This name is suitable for presentation.

This name may not be unique. Using this name is not usually required, the eraser does not live without its corresponding stylus and the stylus name is a better option for presentation.

Source§

fn vendor_id(&self) -> VendorId

The vendor ID of the eraser. Theoretically this may be different to the Stylus::vendor_id() but no such devices have been observed in the wild yet.

Source§

fn tool_id(&self) -> ToolId

The tool ID of the eraser.

Source§

fn buttons(&self) -> &[ToolButton]

The buttons on this Eraser, if any

Source§

fn axes(&self) -> &[Axis]

Source§

impl StructuralPartialEq for Eraser

Auto Trait Implementations§

§

impl Freeze for Eraser

§

impl RefUnwindSafe for Eraser

§

impl Send for Eraser

§

impl Sync for Eraser

§

impl Unpin for Eraser

§

impl UnwindSafe for Eraser

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.