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

Method from

crates/css_lexer/src/source_cursor.rs:83–95  ·  view source on GitHub ↗
(cursor: Cursor, source: &'a str)

Source from the content-addressed store, hash-verified

81
82 #[inline(always)]
83 pub const fn from(cursor: Cursor, source: &'a str) -> Self {
84 debug_assert!(
85 (cursor.len() as usize) == source.len(),
86 "A SourceCursor should be constructed with a source that matches the length of the cursor!"
87 );
88 Self {
89 cursor,
90 source,
91 should_compact: false,
92 #[cfg(feature = "egg")]
93 should_expand: false,
94 }
95 }
96
97 #[inline(always)]
98 pub const fn cursor(&self) -> Cursor {

Callers 2

createHighlightEffectFunction · 0.45
coalesceByDayFunction · 0.45

Calls 1

tokenMethod · 0.45

Tested by

no test coverage detected