MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / find

Method find

css-inline/src/html/attributes.rs:164–172  ·  view source on GitHub ↗
(&self, needle: &QualName)

Source from the content-addressed store, hash-verified

162 }
163
164 pub(crate) fn find(&self, needle: &QualName) -> Option<&str> {
165 self.attributes.iter().find_map(|probe| {
166 if probe.name == *needle {
167 Some(&*probe.value)
168 } else {
169 None
170 }
171 })
172 }
173
174 /// Checks if the attributes map contains a given local name.
175 pub(crate) fn contains(&self, local: html5ever::LocalName) -> bool {

Callers 5

find_style_valueFunction · 0.80
merge_stylesFunction · 0.80
getMethod · 0.80
attr_matchesMethod · 0.80
mainFunction · 0.80

Calls 1

iterMethod · 0.80

Tested by

no test coverage detected