MCPcopy Create free account
hub / github.com/erans/pgsqlite / len

Method len

src/protocol/memory_mapped.rs:138–145  ·  view source on GitHub ↗

Get the length of the data

(&self)

Source from the content-addressed store, hash-verified

136
137 /// Get the length of the data
138 pub fn len(&self) -> usize {
139 match self {
140 MappedValue::Memory(data) => data.len(),
141 MappedValue::Mapped { length, .. } => *length,
142 MappedValue::Reference(data) => data.len(),
143 MappedValue::Small(small) => small.max_text_length(),
144 }
145 }
146
147 /// Check if the value is empty
148 pub fn is_empty(&self) -> bool {

Callers 7

from_sliceMethod · 0.45
create_temp_mappedMethod · 0.45
is_emptyMethod · 0.45
sliceMethod · 0.45
readMethod · 0.45
remainingMethod · 0.45
is_at_endMethod · 0.45

Calls 1

max_text_lengthMethod · 0.80

Tested by

no test coverage detected