pub fn validate_memory_for_export(
database_size_bytes: u64,
) -> Result<(), DatabaseError>Expand description
Validate that sufficient memory is available for export operation
Checks if the system has enough available memory to safely export a database of the given size. Returns an error if insufficient memory is available.
§Arguments
database_size_bytes- Size of the database to export
§Returns
Ok(())- Sufficient memory is availableErr(DatabaseError)- Insufficient memory or cannot determine availability
§Example
use absurder_sql::utils::validate_memory_for_export;
let db_size = 100 * 1024 * 1024; // 100MB
match validate_memory_for_export(db_size) {
Ok(_) => println!("Sufficient memory available"),
Err(e) => eprintln!("Memory check failed: {}", e.message),
}