pub struct DictionaryBuilder { /* private fields */ }Expand description
Builder for constructing a Dictionary with flexible configuration.
§Example
use base_d::{Dictionary, EncodingMode};
let dict = Dictionary::builder()
.chars_from_str("0123456789ABCDEF")
.mode(EncodingMode::Radix)
.build()
.unwrap();Implementations§
Source§impl DictionaryBuilder
impl DictionaryBuilder
Sourcepub fn chars(self, chars: Vec<char>) -> Self
pub fn chars(self, chars: Vec<char>) -> Self
Sets the dictionary characters from a vector.
§Arguments
chars- Vector of characters to use in the dictionary
Sourcepub fn chars_from_str(self, s: &str) -> Self
pub fn chars_from_str(self, s: &str) -> Self
Sets the dictionary characters from a string.
§Arguments
s- String containing the dictionary characters
Sourcepub fn mode(self, mode: EncodingMode) -> Self
pub fn mode(self, mode: EncodingMode) -> Self
Sourcepub fn start_codepoint(self, start_codepoint: u32) -> Self
pub fn start_codepoint(self, start_codepoint: u32) -> Self
Sets the starting Unicode codepoint for ByteRange mode.
§Arguments
start_codepoint- Starting Unicode codepoint
Trait Implementations§
Source§impl Debug for DictionaryBuilder
impl Debug for DictionaryBuilder
Source§impl Default for DictionaryBuilder
impl Default for DictionaryBuilder
Source§fn default() -> DictionaryBuilder
fn default() -> DictionaryBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DictionaryBuilder
impl RefUnwindSafe for DictionaryBuilder
impl Send for DictionaryBuilder
impl Sync for DictionaryBuilder
impl Unpin for DictionaryBuilder
impl UnwindSafe for DictionaryBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more