<commit_before>#[cfg(feature = "with-serde")]
use serde;

use std::default::Default;
use std::fmt;
use std::hash::Hash;
use std::hash::Hasher;
use std::mem;
use std::option;

use crate::clear::Clear;

/// Option-like objects
pub trait OptionLike<T> {
    fn into_option(self) -> Option<T>;
    fn as_option_ref(&self) -> Option<&T>;
    fn as_option_mut(&mut self) -> Option<&mut T>;
    fn set_value(&mut self, value: T);
    fn set_default(&mut self) -> &mut T
    where
        T: Default + Clear;
}

impl<T> OptionLike<T> for Option<T> {<commit_msg>Hide OptionLike from public API<commit_after>#[cfg(feature = "with-serde")]
use serde;

use std::default::Default;
use std::fmt;
use std::hash::Hash;
use std::hash::Hasher;
use std::mem;
use std::option;

use crate::clear::Clear;

/// Option-like objects
#[doc(hidden)]
pub trait OptionLike<T> {
    fn into_option(self) -> Option<T>;
    fn as_option_ref(&self) -> Option<&T>;
    fn as_option_mut(&mut self) -> Option<&mut T>;
    fn set_value(&mut self, value: T);
    fn set_default(&mut self) -> &mut T
    where
        T: Default + Clear;
}

impl<T> OptionLike<T> for Option<T> {
{'fraction_non_alphanumeric': 0.17471466198419666, 'fraction_numerical': 0.0, 'mean_word_length': 4.229357798165138, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4705542', 'n_tokens_mistral': 412, 'n_tokens_neox': 416, 'n_words': 109}