pub fn with_hasher(max_strings: usize, parent_logger: &Logger, hasher: H) -> Self {
		let log = parent_logger.new(o!("subsystem" => "string"));
		let (entry_hash_table, table_memory, table_chunks) = EntryHashTable::new();
		let (entry_reference_map, map_memory, map_chunks) = StaticRefVector::new(max_strings);
		info!(log, "initializing"; "version" => env!("CARGO_PKG_VERSION"));
		Self {
			log,
			allocator: Mutex::new(Allocator::default()),
			entry_hash_table,
			entry_reference_map,
			build_hasher: hasher,
			tracker: Tracker::new(table_memory + map_memory, table_chunks + map_chunks),
		}
	}
/// Initialize the string subsystem with the specified capacity for unique strings, and a
/// hasher.
///
/// # Example
///
/// ```
/// # use astral::thirdparty::slog;
/// use std::hash::BuildHasherDefault;
///
/// use astral::{
/// 	util::hash::Murmur3,
/// 	string::{self, Text},
/// };
///
/// # let logger = slog::Logger::root(slog::Discard, slog::o!());
/// let hasher = BuildHasherDefault::<Murmur3>::default();
/// let string_subsystem = string::Subsystem::with_hasher(64, &logger, hasher);
///
/// let text = Text::new("foo", &string_subsystem);
/// assert_eq!(text, "foo");
/// ```
Initialize the string subsystem with the specified capacity for unique strings, and a
hasher.
Initialize the string subsystem with the specified capacity for unique strings and a hasher .
pub fn with_hasher(max_strings: usize, parent_logger: &Logger, hasher: H) -> Self {
		let log = parent_logger.new(o!("subsystem" => "string"));
		let (entry_hash_table, table_memory, table_chunks) = EntryHashTable::new();
		let (entry_reference_map, map_memory, map_chunks) = StaticRefVector::new(max_strings);
		info!(log, "initializing"; "version" => env!("CARGO_PKG_VERSION"));
		Self {
			log,
			allocator: Mutex::new(Allocator::default()),
			entry_hash_table,
			entry_reference_map,
			build_hasher: hasher,
			tracker: Tracker::new(table_memory + map_memory, table_chunks + map_chunks),
		}
	}
pub fn with_hasher ( max_strings : usize , parent_logger : & Logger , hasher : H ) -> Self { let log = parent_logger . new ( o ! ( " " " " ) ) ; let ( entry_hash_table , table_memory , table_chunks ) = EntryHashTable :: new ( ) ; let ( entry_reference_map , map_memory , map_chunks ) = StaticRefVector :: new ( max_strings ) ; info ! ( log " " " " env ( " " ) ) ; Self { log , allocator : Mutex :: new ( Allocator :: default ( ) ) , entry_hash_table , entry_reference_map , build_hasher : hasher , tracker : Tracker :: new ( table_memory + map_memory , table_chunks + map_chunks ) , } }
Initialize the string subsystem with the specified capacity for unique strings, and a
hasher.
Initialize the string subsystem with the specified capacity for unique strings and a hasher .
max_strings
usize
parent_logger
&Logger
hasher
H
max_strings
usize
parent_logger
&Logger
hasher
H
example
None
use astral::thirdparty::slog;
use std::hash::BuildHasherDefault.

use astral::{
util::hash::Murmur3,
string::{self, Text},
}.
use std :: hash :: BuildHasherDefault . use astral :: { util :: hash :: Murmur3 string :: { self Text } } .
let logger = slog::logger::root(slog::discard, slog::o!());
let hasher = BuildHasherDefault::::default();
let string_subsystem = string::Subsystem::with_hasher(64, &logger, hasher).

let text = Text::new("foo", &string_subsystem);
assert_eq!(text, "foo");
```
let hasher = BuildHasherDefault :::: default () ; let string_subsystem = string :: Subsystem :: with_hasher ( 64 &logger hasher ) . let text = Text :: new ( " foo " &string_subsystem ) ; assert_eq! ( text " foo " ) ; ` ` `