pub trait CustomCursorExtWebSys {
// Required methods
fn is_animation(&self) -> bool;
fn from_url(
url: String,
hotspot_x: u16,
hotspot_y: u16,
) -> CustomCursorSource;
fn from_animation(
duration: Duration,
cursors: Vec<CustomCursor>,
) -> Result<CustomCursorSource, BadAnimation>;
}Required Methods§
sourcefn is_animation(&self) -> bool
fn is_animation(&self) -> bool
Returns if this cursor is an animation.
sourcefn from_url(url: String, hotspot_x: u16, hotspot_y: u16) -> CustomCursorSource
fn from_url(url: String, hotspot_x: u16, hotspot_y: u16) -> CustomCursorSource
Creates a new cursor from a URL pointing to an image. It uses the url css function, but browser support for image formats is inconsistent. Using PNG is recommended.
sourcefn from_animation(
duration: Duration,
cursors: Vec<CustomCursor>,
) -> Result<CustomCursorSource, BadAnimation>
fn from_animation( duration: Duration, cursors: Vec<CustomCursor>, ) -> Result<CustomCursorSource, BadAnimation>
Crates a new animated cursor from multiple CustomCursors.
Supplied cursors can’t be empty or other animations.
Object Safety§
This trait is not object safe.