跳到主要内容

Button

搜索

枚举Button 

Source
pub enum Button {
    Left,
    Right,
    Middle,
    Unknown(u8),
}
展开描述

标准鼠标按钮。有些鼠标有超过 3 个按钮。这些按钮未定义,不同的操作系统会给出不同的 Button::Unknown 值。

变体§

§

Left

§

Right

§

Middle

§

Unknown(u8)

Trait 实现§

Source§

impl Clone for Button

Source§

fn clone(&self) -> Button

返回该值的一个副本。阅读更多
1.0.0 · Source§

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

执行从 source. 阅读更多
Source§

impl Debug for Button

Source§

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

使用给定的格式化器格式化该值。阅读更多
Source§

impl Hash for Button

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. 阅读更多
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. 阅读更多
Source§

impl PartialEq for Button

Source§

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

测试 selfother 的值是否相等,并由 == 使用。
1.0.0 · Source§

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

测试 !=。默认实现几乎总是足够的,除非有非常充分的理由,否则不应被重写。
Source§

impl Copy for Button

Source§

impl Eq for Button

Source§

impl StructuralPartialEq for Button

自动 Trait 实现§

通用实现§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. 阅读更多
Source§

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

Source§

fn borrow(&self) -> &T

对拥有的值进行不可变借用。阅读更多
Source§

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

Source§

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

对拥有的值进行可变借用。阅读更多
Source§

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

Source§

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

🔬这是一个仅在 nightly 可见的实验性 API。(clone_to_uninit)
执行从 self to dest. 阅读更多
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

原样返回参数。

Source§

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

Source§

fn into(self) -> U

调用 U::from(self)

That is, this conversion is whatever the implementation of From<T> for U 的实现自行决定。

Source§

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

Source§

type Owned = T

获取所有权后得到的类型。
Source§

fn to_owned(&self) -> T

从借用的数据创建拥有的数据,通常通过克隆完成。阅读更多
Source§

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

使用借用的数据替换拥有的数据,通常通过克隆完成。阅读更多
Source§

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

Source§

type Error = Infallible

转换失败时返回的类型。
Source§

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

执行转换。
Source§

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

Source§

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

转换失败时返回的类型。
Source§

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

执行转换。