pub struct PositionalAttr(pub &'static str, pub Option<AttrValue>);
Expand description
Key-value tuple which makes up an item of the Attributes::Vec
variant.
Tuple Fields§
§0: &'static str
§1: Option<AttrValue>
Implementations§
Source§impl PositionalAttr
impl PositionalAttr
Sourcepub fn new(key: &'static str, value: impl IntoOptPropValue<AttrValue>) -> Self
pub fn new(key: &'static str, value: impl IntoOptPropValue<AttrValue>) -> Self
Create a positional attribute
Sourcepub fn new_boolean(key: &'static str, present: bool) -> Self
pub fn new_boolean(key: &'static str, present: bool) -> Self
Create a boolean attribute.
present
controls whether the attribute is added
Sourcepub fn new_placeholder(key: &'static str) -> Self
pub fn new_placeholder(key: &'static str) -> Self
Create a placeholder for removed attributes
Trait Implementations§
Source§impl Clone for PositionalAttr
impl Clone for PositionalAttr
Source§fn clone(&self) -> PositionalAttr
fn clone(&self) -> PositionalAttr
Returns a copy 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 PositionalAttr
impl Debug for PositionalAttr
Source§impl PartialEq for PositionalAttr
impl PartialEq for PositionalAttr
impl Eq for PositionalAttr
impl StructuralPartialEq for PositionalAttr
Auto Trait Implementations§
impl Freeze for PositionalAttr
impl RefUnwindSafe for PositionalAttr
impl Send for PositionalAttr
impl Sync for PositionalAttr
impl Unpin for PositionalAttr
impl UnwindSafe for PositionalAttr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
Source§fn into_opt_prop_value(self) -> Option<V>
fn into_opt_prop_value(self) -> Option<V>
Convert
self
to an optional value of a Properties
struct.Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.