pub enum AnnotationAttr {
Global(Attribute),
Encoding(String),
}Expand description
An attribute of annotation element. Either one of the global Attributes, or encode
attribute.
Variants§
Global(Attribute)
One of the global Attributes.
Encoding(String)
NOTE: Authors can use the encoding attribute to distinguish annotations for HTML integration point, clipboard copy, alternative rendering, etc. In particular, CSS can be used to render alternative annotations e.g.
/* Hide the annotated child. */
semantics > :first-child { display: none; }
/* Show all text annotations. */
semantics > annotation { display: inline; }
/* Show all HTML annotations. */
semantics > annotation-xml[encoding="text/html" i],
semantics > annotation-xml[encoding="application/xhtml+xml" i] {
display: inline-block;
}Trait Implementations§
Source§impl Clone for AnnotationAttr
impl Clone for AnnotationAttr
Source§fn clone(&self) -> AnnotationAttr
fn clone(&self) -> AnnotationAttr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AnnotationAttr
impl Debug for AnnotationAttr
impl Eq for AnnotationAttr
Source§impl From<Attribute> for AnnotationAttr
impl From<Attribute> for AnnotationAttr
Source§impl Ord for AnnotationAttr
impl Ord for AnnotationAttr
Source§fn cmp(&self, other: &AnnotationAttr) -> Ordering
fn cmp(&self, other: &AnnotationAttr) -> Ordering
1.21.0 (const: unstable) · 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 AnnotationAttr
impl PartialEq for AnnotationAttr
Source§fn eq(&self, other: &AnnotationAttr) -> bool
fn eq(&self, other: &AnnotationAttr) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AnnotationAttr
impl PartialOrd for AnnotationAttr
impl StructuralPartialEq for AnnotationAttr
Auto Trait Implementations§
impl Freeze for AnnotationAttr
impl RefUnwindSafe for AnnotationAttr
impl Send for AnnotationAttr
impl Sync for AnnotationAttr
impl Unpin for AnnotationAttr
impl UnsafeUnpin for AnnotationAttr
impl UnwindSafe for AnnotationAttr
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