Struct grep_searcher::Encoding
source · pub struct Encoding(/* private fields */);
Expand description
An encoding to use when searching.
An encoding can be used to configure a SearcherBuilder
to transcode
source data from an encoding to UTF-8 before searching.
An Encoding
will always be cheap to clone.
Implementations§
source§impl Encoding
impl Encoding
sourcepub fn new(label: &str) -> Result<Encoding, ConfigError>
pub fn new(label: &str) -> Result<Encoding, ConfigError>
Create a new encoding for the specified label.
The encoding label provided is mapped to an encoding via the set of available choices specified in the Encoding Standard. If the given label does not correspond to a valid encoding, then this returns an error.
Trait Implementations§
impl Eq for Encoding
impl StructuralPartialEq for Encoding
Auto Trait Implementations§
impl Freeze for Encoding
impl RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl UnwindSafe for Encoding
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)