pub enum Spellcheck {
True,
False,
}Expand description
The spellcheck attribute values.
§Purpose
Controls whether the browser’s spell-checking feature is enabled for editable elements, helping users catch typing errors.
§Usage Context
- Used with: All HTML elements (global attribute)
- Primarily useful for: Editable elements (
contenteditable,<input>,<textarea>) - Default: Browser-dependent, typically enabled for editable text
§Valid Values
True: Enable spell-checking for this elementFalse: Disable spell-checking for this element
§Example
use ironhtml_attributes::{AttributeValue, Spellcheck};
let check = Spellcheck::False;
assert_eq!(check.to_attr_value(), "false");<textarea spellcheck="true">Enable spell-checking here</textarea>
<input type="text" spellcheck="false" placeholder="Code (no spellcheck)">§WHATWG Specification
Variants§
True
Enable spell-checking for this element. The browser will check spelling and mark errors.
False
Disable spell-checking for this element. Useful for code editors, usernames, and technical content.
Trait Implementations§
Source§impl AttributeValue for Spellcheck
impl AttributeValue for Spellcheck
Source§fn to_attr_value(&self) -> Cow<'static, str>
fn to_attr_value(&self) -> Cow<'static, str>
Convert to the attribute value string.
Source§impl Clone for Spellcheck
impl Clone for Spellcheck
Source§fn clone(&self) -> Spellcheck
fn clone(&self) -> Spellcheck
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 Spellcheck
impl Debug for Spellcheck
Source§impl PartialEq for Spellcheck
impl PartialEq for Spellcheck
impl Copy for Spellcheck
impl Eq for Spellcheck
impl StructuralPartialEq for Spellcheck
Auto Trait Implementations§
impl Freeze for Spellcheck
impl RefUnwindSafe for Spellcheck
impl Send for Spellcheck
impl Sync for Spellcheck
impl Unpin for Spellcheck
impl UnwindSafe for Spellcheck
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