pub enum PointerIcon {
System(CursorIcon),
Custom(CustomPointerIcon),
}Expand description
The pointer’s appearance over a region of the UI.
Variants§
System(CursorIcon)
One of the standard shapes the platform already draws, named by the CSS cursor vocabulary.
Custom(CustomPointerIcon)
A shape the application draws itself.
Implementations§
Source§impl PointerIcon
impl PointerIcon
Sourcepub fn custom(
image: ImageBitmap,
hotspot_x: u32,
hotspot_y: u32,
) -> Result<Self, PointerIconError>
pub fn custom( image: ImageBitmap, hotspot_x: u32, hotspot_y: u32, ) -> Result<Self, PointerIconError>
Builds a custom icon from image with its hotspot at (hotspot_x,
hotspot_y).
Sourcepub fn css_keyword(&self) -> Option<&'static str>
pub fn css_keyword(&self) -> Option<&'static str>
The CSS cursor keyword for a standard shape, or None for a custom
one, which a browser names with a url() instead.
Trait Implementations§
Source§impl Clone for PointerIcon
impl Clone for PointerIcon
Source§fn clone(&self) -> PointerIcon
fn clone(&self) -> PointerIcon
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PointerIcon
impl Debug for PointerIcon
Source§impl Default for PointerIcon
impl Default for PointerIcon
impl Eq for PointerIcon
Source§impl From<CursorIcon> for PointerIcon
impl From<CursorIcon> for PointerIcon
Source§fn from(icon: CursorIcon) -> Self
fn from(icon: CursorIcon) -> Self
Converts to this type from the input type.
Source§impl From<CustomPointerIcon> for PointerIcon
impl From<CustomPointerIcon> for PointerIcon
Source§fn from(icon: CustomPointerIcon) -> Self
fn from(icon: CustomPointerIcon) -> Self
Converts to this type from the input type.
Source§impl Hash for PointerIcon
impl Hash for PointerIcon
Source§impl PartialEq for PointerIcon
impl PartialEq for PointerIcon
impl StructuralPartialEq for PointerIcon
Auto Trait Implementations§
impl Freeze for PointerIcon
impl RefUnwindSafe for PointerIcon
impl Send for PointerIcon
impl Sync for PointerIcon
impl Unpin for PointerIcon
impl UnsafeUnpin for PointerIcon
impl UnwindSafe for PointerIcon
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