MCPcopy Create free account
hub / github.com/csskit/csskit / contains

Method contains

crates/css_lexer/src/span.rs:50–52  ·  view source on GitHub ↗

Checks if the given [Span] would fit entirely within this [Span].

(&self, span: Span)

Source from the content-addressed store, hash-verified

48
49 /// Checks if the given [Span] would fit entirely within this [Span].
50 pub fn contains(&self, span: Span) -> bool {
51 self.start <= span.start && span.end <= self.end
52 }
53
54 /// Checks if this [Span] overlaps with the given [Span] (i.e. they share at least one byte).
55 pub fn overlaps(&self, span: Span) -> bool {

Callers 15

matchedMethod · 0.45
has_importantMethod · 0.45
has_custom_propertiesMethod · 0.45
has_computedMethod · 0.45
has_shorthandsMethod · 0.45
has_longhandsMethod · 0.45
has_unknownMethod · 0.45
has_style_rulesMethod · 0.45
has_at_rulesMethod · 0.45
has_functionsMethod · 0.45
is_deprecatedMethod · 0.45
is_experimentalMethod · 0.45

Calls

no outgoing calls

Tested by 1

is_excluded_specFunction · 0.36