pub struct BinaryUtils;Expand description
Utilities for working with binary tokenizer files
Implementations§
Source§impl BinaryUtils
impl BinaryUtils
Sourcepub fn validate_file<P: AsRef<Path>>(
path: P,
config: &BinaryConfig,
) -> Result<bool>
pub fn validate_file<P: AsRef<Path>>( path: P, config: &BinaryConfig, ) -> Result<bool>
Validate a binary tokenizer file
Sourcepub fn compare_files<P: AsRef<Path>>(
path1: P,
path2: P,
config: &BinaryConfig,
) -> Result<bool>
pub fn compare_files<P: AsRef<Path>>( path1: P, path2: P, config: &BinaryConfig, ) -> Result<bool>
Compare two binary tokenizer files
Sourcepub fn get_compression_ratio<P: AsRef<Path>>(
path: P,
config: &BinaryConfig,
) -> Result<f64>
pub fn get_compression_ratio<P: AsRef<Path>>( path: P, config: &BinaryConfig, ) -> Result<f64>
Get compression ratio for a binary file
Sourcepub fn migrate_format<P: AsRef<Path>>(
old_path: P,
new_path: P,
config: &BinaryConfig,
) -> Result<BinaryHeader>
pub fn migrate_format<P: AsRef<Path>>( old_path: P, new_path: P, config: &BinaryConfig, ) -> Result<BinaryHeader>
Migrate an old format file to the current format
Auto Trait Implementations§
impl Freeze for BinaryUtils
impl RefUnwindSafe for BinaryUtils
impl Send for BinaryUtils
impl Sync for BinaryUtils
impl Unpin for BinaryUtils
impl UnsafeUnpin for BinaryUtils
impl UnwindSafe for BinaryUtils
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more