Enum HtmlTag
#[non_exhaustive]pub enum HtmlTag<'a> {
Show 137 variants
A,
Abbr,
Address,
Area,
Article,
Aside,
Audio,
B,
Base,
Bdi,
Bdo,
Big,
Blockquote,
Body,
Br,
Button,
Canvas,
Caption,
Center,
Cite,
Code,
Col,
Colgroup,
Data,
Datalist,
Dd,
Del,
Desc,
Details,
Dfn,
Dialog,
Div,
Dl,
Dt,
Em,
Embed,
Fieldset,
Figcaption,
Figure,
Font,
Footer,
Foreignobject,
Form,
Frameset,
H1,
H2,
H3,
H4,
H5,
H6,
Head,
Header,
Hgroup,
Hr,
Html,
I,
Iframe,
Img,
Input,
Ins,
Kbd,
Keygen,
Label,
Legend,
Li,
Link,
Listing,
Main,
Map,
Mark,
Math,
Menu,
Meta,
Meter,
Mi,
Mn,
Mo,
Ms,
Mtext,
Nav,
Nobr,
Noembed,
Noframes,
Noscript,
Object,
Ol,
Optgroup,
Option,
Output,
P,
Param,
Picture,
Plaintext,
Pre,
Progress,
Q,
Rb,
Rp,
Rt,
Rtc,
Ruby,
S,
Samp,
Script,
Search,
Section,
Select,
Small,
Source,
Span,
Strike,
Strong,
Style,
Sub,
Summary,
Sup,
Svg,
Table,
Tbody,
Td,
Template,
Textarea,
Tfoot,
Th,
Thead,
Time,
Title,
Tr,
Track,
Tt,
U,
Ul,
Var,
Video,
Wbr,
Xmp,
Other(&'a [u8]),
}html and http only.Expand description
A classified HTML tag name.
Known elements (the HTML5 set plus the foreign-content and legacy
tags the parser tracks) are fieldless variants; anything else is
Other, borrowing the original-case name bytes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
A
The <a> element.
Abbr
The <abbr> element.
Address
The <address> element.
Area
The <area> element.
Article
The <article> element.
Aside
The <aside> element.
Audio
The <audio> element.
B
The <b> element.
Base
The <base> element.
Bdi
The <bdi> element.
Bdo
The <bdo> element.
Big
The <big> element.
Blockquote
The <blockquote> element.
Body
The <body> element.
Br
The <br> element.
Button
The <button> element.
Canvas
The <canvas> element.
Caption
The <caption> element.
Center
The <center> element.
Cite
The <cite> element.
Code
The <code> element.
Col
The <col> element.
Colgroup
The <colgroup> element.
Data
The <data> element.
Datalist
The <datalist> element.
Dd
The <dd> element.
Del
The <del> element.
Desc
The <desc> element.
Details
The <details> element.
Dfn
The <dfn> element.
Dialog
The <dialog> element.
Div
The <div> element.
Dl
The <dl> element.
Dt
The <dt> element.
Em
The <em> element.
Embed
The <embed> element.
Fieldset
The <fieldset> element.
Figcaption
The <figcaption> element.
Figure
The <figure> element.
Font
The <font> element.
The <footer> element.
Foreignobject
The <foreignobject> element.
Form
The <form> element.
Frameset
The <frameset> element.
H1
The <h1> element.
H2
The <h2> element.
H3
The <h3> element.
H4
The <h4> element.
H5
The <h5> element.
H6
The <h6> element.
Head
The <head> element.
Header
The <header> element.
Hgroup
The <hgroup> element.
Hr
The <hr> element.
Html
The <html> element.
I
The <i> element.
Iframe
The <iframe> element.
Img
The <img> element.
Input
The <input> element.
Ins
The <ins> element.
Kbd
The <kbd> element.
Keygen
The <keygen> element.
Label
The <label> element.
Legend
The <legend> element.
Li
The <li> element.
Link
The <link> element.
Listing
The <listing> element.
Main
The <main> element.
Map
The <map> element.
Mark
The <mark> element.
Math
The <math> element.
Menu
The <menu> element.
Meta
The <meta> element.
Meter
The <meter> element.
Mi
The <mi> element.
Mn
The <mn> element.
Mo
The <mo> element.
Ms
The <ms> element.
Mtext
The <mtext> element.
The <nav> element.
Nobr
The <nobr> element.
Noembed
The <noembed> element.
Noframes
The <noframes> element.
Noscript
The <noscript> element.
Object
The <object> element.
Ol
The <ol> element.
Optgroup
The <optgroup> element.
Option
The <option> element.
Output
The <output> element.
P
The <p> element.
Param
The <param> element.
Picture
The <picture> element.
Plaintext
The <plaintext> element.
Pre
The <pre> element.
Progress
The <progress> element.
Q
The <q> element.
Rb
The <rb> element.
Rp
The <rp> element.
Rt
The <rt> element.
Rtc
The <rtc> element.
Ruby
The <ruby> element.
S
The <s> element.
Samp
The <samp> element.
Script
The <script> element.
Search
The <search> element.
Section
The <section> element.
Select
The <select> element.
Small
The <small> element.
Source
The <source> element.
Span
The <span> element.
Strike
The <strike> element.
Strong
The <strong> element.
Style
The <style> element.
Sub
The <sub> element.
Summary
The <summary> element.
Sup
The <sup> element.
Svg
The <svg> element.
Table
The <table> element.
Tbody
The <tbody> element.
Td
The <td> element.
Template
The <template> element.
Textarea
The <textarea> element.
Tfoot
The <tfoot> element.
Th
The <th> element.
Thead
The <thead> element.
Time
The <time> element.
Title
The <title> element.
Tr
The <tr> element.
Track
The <track> element.
Tt
The <tt> element.
U
The <u> element.
Ul
The <ul> element.
Var
The <var> element.
Video
The <video> element.
Wbr
The <wbr> element.
Xmp
The <xmp> element.
Other(&'a [u8])
A tag outside the known set (e.g. a custom element). Borrows the original-case name bytes from the source.
Implementations§
§impl HtmlTag<'_>
impl HtmlTag<'_>
pub fn is_void(&self) -> bool
pub fn is_void(&self) -> bool
Returns true if this is an HTML5 void element: one that never has
content or an end tag — area, base, br, col, embed, hr,
img, input, link, meta, source, track, wbr.
Note param is not void in the current spec (it is obsolete).
pub fn is_raw_text(&self) -> bool
pub fn is_raw_text(&self) -> bool
Returns true if this is a raw text element — script or style.
Their content is tokenized verbatim: no markup, no character
references, only the matching end tag closes them.
This is the spec category, not rama’s broader tokenizer raw-text set
(which also covers legacy xmp / iframe / noembed / noframes /
noscript).
pub fn is_escapable_raw_text(&self) -> bool
pub fn is_escapable_raw_text(&self) -> bool
Returns true if this is an escapable raw text element — textarea
or title. Like a raw text element, but character references are
recognized in its content.
pub fn is_phrasing_content(&self) -> bool
pub fn is_phrasing_content(&self) -> bool
Returns true if this is phrasing content — the spec category for
the text-level (“inline”) elements: the runs of text in a document
and the elements that mark them up (a, span, em, strong,
img, br, input, script, …).
Membership is the current WHATWG list of elements that are
inherently phrasing content. Elements that qualify only in a
specific context (area within a map, link / meta carrying an
itemprop) are excluded — this is a name-only predicate. Obsolete
presentational tags (big, font, tt, strike, nobr) are
excluded too; they are not in the modern content model.
Trait Implementations§
impl<'a> Copy for HtmlTag<'a>
impl<'a> Eq for HtmlTag<'a>
impl<'a> StructuralPartialEq for HtmlTag<'a>
Auto Trait Implementations§
impl<'a> Freeze for HtmlTag<'a>
impl<'a> RefUnwindSafe for HtmlTag<'a>
impl<'a> Send for HtmlTag<'a>
impl<'a> Sync for HtmlTag<'a>
impl<'a> Unpin for HtmlTag<'a>
impl<'a> UnsafeUnpin for HtmlTag<'a>
impl<'a> UnwindSafe for HtmlTag<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<V, F> ValueFormatter<&V> for F
impl<V, F> ValueFormatter<&V> for F
§fn format_value(writer: impl ValueWriter, value: &&V)
fn format_value(writer: impl ValueWriter, value: &&V)
value to writer§impl<V, F> ValueFormatter<Arc<V>> for F
impl<V, F> ValueFormatter<Arc<V>> for F
§fn format_value(writer: impl ValueWriter, value: &Arc<V>)
fn format_value(writer: impl ValueWriter, value: &Arc<V>)
value to writer§impl<V, F> ValueFormatter<Box<V>> for F
impl<V, F> ValueFormatter<Box<V>> for F
§fn format_value(writer: impl ValueWriter, value: &Box<V>)
fn format_value(writer: impl ValueWriter, value: &Box<V>)
value to writer§impl<V, F> ValueFormatter<Cow<'_, V>> for F
impl<V, F> ValueFormatter<Cow<'_, V>> for F
§fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
value to writer§impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
§fn format_value(writer: impl ValueWriter, value: &Option<V>)
fn format_value(writer: impl ValueWriter, value: &Option<V>)
value to writer