pub fn ensure(self, key: S::Key) -> Result<(), ChartError> {
		if self.contains(key) {
			return Ok(());
		}
		self.acquire(key)?;
		Ok(())
	}
/// Ensures a value exists in the Map, creating it if it doesn't exist.
///
/// # Errors
///
/// See [`Error`].
///
/// [`Error`]: heed::Error
Ensures a value exists in the Map, creating it if it doesn't exist.
Ensures a value exists in the Map creating it if it doesn ' t exist .
pub fn ensure(self, key: S::Key) -> Result<(), ChartError> {
		if self.contains(key) {
			return Ok(());
		}
		self.acquire(key)?;
		Ok(())
	}
pub fn ensure ( self , key : S :: Key ) -> Result < ( ) , ChartError > { if self . contains ( key ) { return Ok ( ( ) ) ; } self . acquire ( key ) ? ; Ok ( ( ) ) }
Ensures a value exists in the Map, creating it if it doesn't exist.
Ensures a value exists in the Map creating it if it doesn ' t exist .
self
key
S::Key
self
key
S::Key
errors
None