Skip to main content

Tag

Enum Tag 

Source
#[repr(u8)]
pub enum Tag {
Show 137 variants A = 0, Abbr = 1, Address = 2, Applet = 3, Area = 4, Article = 5, Aside = 6, Audio = 7, B = 8, Base = 9, Basefont = 10, Bdi = 11, Bdo = 12, Bgsound = 13, Big = 14, Blockquote = 15, Body = 16, Br = 17, Button = 18, Canvas = 19, Caption = 20, Center = 21, Cite = 22, Code = 23, Col = 24, Colgroup = 25, Data = 26, Datalist = 27, Dd = 28, Del = 29, Details = 30, Dfn = 31, Dialog = 32, Dir = 33, Div = 34, Dl = 35, Dt = 36, Em = 37, Embed = 38, Fieldset = 39, Figcaption = 40, Figure = 41, Font = 42, Footer = 43, Form = 44, Frame = 45, Frameset = 46, H1 = 47, H2 = 48, H3 = 49, H4 = 50, H5 = 51, H6 = 52, Head = 53, Header = 54, Hgroup = 55, Hr = 56, Html = 57, I = 58, Iframe = 59, Img = 60, Input = 61, Ins = 62, Kbd = 63, Keygen = 64, Label = 65, Legend = 66, Li = 67, Link = 68, Listing = 69, Main = 70, Map = 71, Mark = 72, Marquee = 73, Math = 74, Menu = 75, Meta = 76, Meter = 77, Nav = 78, Nobr = 79, Noembed = 80, Noframes = 81, Noscript = 82, Object = 83, Ol = 84, Optgroup = 85, Option = 86, Output = 87, P = 88, Param = 89, Picture = 90, Plaintext = 91, Pre = 92, Progress = 93, Q = 94, Rb = 95, Rp = 96, Rt = 97, Rtc = 98, Ruby = 99, S = 100, Samp = 101, Script = 102, Search = 103, Section = 104, Select = 105, Slot = 106, Small = 107, Source = 108, Span = 109, Strike = 110, Strong = 111, Style = 112, Sub = 113, Summary = 114, Sup = 115, Svg = 116, Table = 117, Tbody = 118, Td = 119, Template = 120, Textarea = 121, Tfoot = 122, Th = 123, Thead = 124, Time = 125, Title = 126, Tr = 127, Track = 128, Tt = 129, U = 130, Ul = 131, Var = 132, Video = 133, Wbr = 134, Xmp = 135, Other = 136,
}
Expand description

HTML 标签。不认识的标签是 Tag::Other,名字从 crate::Element::name 取。

Variants§

§

A = 0

§

Abbr = 1

§

Address = 2

§

Applet = 3

§

Area = 4

§

Article = 5

§

Aside = 6

§

Audio = 7

§

B = 8

§

Base = 9

§

Basefont = 10

§

Bdi = 11

§

Bdo = 12

§

Bgsound = 13

§

Big = 14

§

Blockquote = 15

§

Body = 16

§

Br = 17

§

Button = 18

§

Canvas = 19

§

Caption = 20

§

Center = 21

§

Cite = 22

§

Code = 23

§

Col = 24

§

Colgroup = 25

§

Data = 26

§

Datalist = 27

§

Dd = 28

§

Del = 29

§

Details = 30

§

Dfn = 31

§

Dialog = 32

§

Dir = 33

§

Div = 34

§

Dl = 35

§

Dt = 36

§

Em = 37

§

Embed = 38

§

Fieldset = 39

§

Figcaption = 40

§

Figure = 41

§

Font = 42

§

Footer = 43

§

Form = 44

§

Frame = 45

§

Frameset = 46

§

H1 = 47

§

H2 = 48

§

H3 = 49

§

H4 = 50

§

H5 = 51

§

H6 = 52

§

Head = 53

§

Header = 54

§

Hgroup = 55

§

Hr = 56

§

Html = 57

§

I = 58

§

Iframe = 59

§

Img = 60

§

Input = 61

§

Ins = 62

§

Kbd = 63

§

Keygen = 64

§

Label = 65

§

Legend = 66

§

Li = 67

§

Listing = 69

§

Main = 70

§

Map = 71

§

Mark = 72

§

Marquee = 73

§

Math = 74

§

Menu = 75

§

Meta = 76

§

Meter = 77

§

Nav = 78

§

Nobr = 79

§

Noembed = 80

§

Noframes = 81

§

Noscript = 82

§

Object = 83

§

Ol = 84

§

Optgroup = 85

§

Option = 86

§

Output = 87

§

P = 88

§

Param = 89

§

Picture = 90

§

Plaintext = 91

§

Pre = 92

§

Progress = 93

§

Q = 94

§

Rb = 95

§

Rp = 96

§

Rt = 97

§

Rtc = 98

§

Ruby = 99

§

S = 100

§

Samp = 101

§

Script = 102

§

Search = 103

§

Section = 104

§

Select = 105

§

Slot = 106

§

Small = 107

§

Source = 108

§

Span = 109

§

Strike = 110

§

Strong = 111

§

Style = 112

§

Sub = 113

§

Summary = 114

§

Sup = 115

§

Svg = 116

§

Table = 117

§

Tbody = 118

§

Td = 119

§

Template = 120

§

Textarea = 121

§

Tfoot = 122

§

Th = 123

§

Thead = 124

§

Time = 125

§

Title = 126

§

Tr = 127

§

Track = 128

§

Tt = 129

§

U = 130

§

Ul = 131

§

Var = 132

§

Video = 133

§

Wbr = 134

§

Xmp = 135

§

Other = 136

不在上面列表里的标签,包括自定义元素和 SVG、MathML 内部的元素。

Implementations§

Source§

impl Tag

Source

pub fn name(self) -> &'static str

小写名字;Tag::Other 返回空串。

Source

pub fn from_name(name: &str) -> Tag

按小写名字查标签。

Trait Implementations§

Source§

impl Clone for Tag

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Tag

Source§

impl Debug for Tag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Tag

Source§

impl Hash for Tag

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Tag

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Tag

Auto Trait Implementations§

§

impl Freeze for Tag

§

impl RefUnwindSafe for Tag

§

impl Send for Tag

§

impl Sync for Tag

§

impl Unpin for Tag

§

impl UnsafeUnpin for Tag

§

impl UnwindSafe for Tag

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.