pub enum AddColorStopError {
SyntaxError(SyntaxError),
IndexSizeError(IndexSizeError),
}
Expand description
A enum of the exceptions that CanvasGradient.add_color_stop() may throw
Variants§
SyntaxError(SyntaxError)
A SyntaxError if the color could not be parsed as a valid CSS color
IndexSizeError(IndexSizeError)
An IndexSizeError if the offset was not between 0 and 1, inclusive
Trait Implementations§
Source§impl Clone for AddColorStopError
impl Clone for AddColorStopError
Source§fn clone(&self) -> AddColorStopError
fn clone(&self) -> AddColorStopError
Returns a duplicate of the value. Read more
1.0.0 · 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 AddColorStopError
impl Debug for AddColorStopError
Source§impl Display for AddColorStopError
impl Display for AddColorStopError
Source§impl Error for AddColorStopError
impl Error for AddColorStopError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
Source§impl TryFrom<Value> for AddColorStopError
impl TryFrom<Value> for AddColorStopError
impl JsSerialize for AddColorStopError
Auto Trait Implementations§
impl Freeze for AddColorStopError
impl RefUnwindSafe for AddColorStopError
impl Send for AddColorStopError
impl Sync for AddColorStopError
impl Unpin for AddColorStopError
impl UnwindSafe for AddColorStopError
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