Create a mapped value from large text data
(&self, text_data: &str)
| 282 | |
| 283 | /// Create a mapped value from large text data |
| 284 | pub fn create_from_text(&self, text_data: &str) -> io::Result<MappedValue> { |
| 285 | if text_data.is_empty() { |
| 286 | return Ok(MappedValue::Memory(Vec::new())); |
| 287 | } |
| 288 | |
| 289 | MappedValue::from_slice(text_data.as_bytes(), &self.config) |
| 290 | } |
| 291 | |
| 292 | /// Check if a value size should use memory mapping |
| 293 | pub fn should_use_mmap(&self, size: usize) -> bool { |