pub enum AtValue {
Ignored,
None,
Some(String),
}
Expand description
Attribute value.
Example
use seed::{prelude::*, *};
struct Model {
message: String
}
let model = Model { message: "foo".to_string() };
let _ = attrs! {
At::Disabled => false.as_at_value(), // same as `=> AtValue::Ignored`
At::Value => model.message,
At::AutoFocus => AtValue::None,
};
Variants
Ignored
The whole attribute is ignored (i.e. not rendered).
None
Attribute value is not used (i.e. rendered as empty string).
Some(String)
Rendered attribute value.
Trait Implementations
impl Eq for AtValue
impl StructuralEq for AtValue
impl StructuralPartialEq for AtValue
Auto Trait Implementations
impl RefUnwindSafe for AtValue
impl Send for AtValue
impl Sync for AtValue
impl Unpin for AtValue
impl UnwindSafe for AtValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.