pub enum Compactability {
No,
Yes {
final_slash: bool,
},
}
Expand description
Represents the compactability of a tag.
Variants§
No
The tag is not compactable.
This means that the tag will always be written as <tag></tag>
.
Yes
The tag is compactable.
This means that the tag will be written as <tag/>
if it has no contents.
The final_slash
parameter determines whether the tag will be written as <tag>
or <tag/>
.
Implementations§
Source§impl Compactability
impl Compactability
Sourcepub fn is_compactable(&self) -> bool
pub fn is_compactable(&self) -> bool
Returns wether the tag is compactable.
Trait Implementations§
Source§impl Clone for Compactability
impl Clone for Compactability
Source§fn clone(&self) -> Compactability
fn clone(&self) -> Compactability
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 Compactability
impl Debug for Compactability
Source§impl From<Compactability> for bool
impl From<Compactability> for bool
Source§fn from(c: Compactability) -> Self
fn from(c: Compactability) -> Self
Converts to this type from the input type.
Source§impl From<bool> for Compactability
impl From<bool> for Compactability
Source§impl Hash for Compactability
impl Hash for Compactability
Source§impl Ord for Compactability
impl Ord for Compactability
Source§fn cmp(&self, other: &Compactability) -> Ordering
fn cmp(&self, other: &Compactability) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Compactability
impl PartialEq for Compactability
Source§impl PartialOrd for Compactability
impl PartialOrd for Compactability
impl Copy for Compactability
impl Eq for Compactability
impl StructuralPartialEq for Compactability
Auto Trait Implementations§
impl Freeze for Compactability
impl RefUnwindSafe for Compactability
impl Send for Compactability
impl Sync for Compactability
impl Unpin for Compactability
impl UnwindSafe for Compactability
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