Enum ini::EscapePolicy
source · [−]pub enum EscapePolicy {
Nothing,
Basics,
BasicsUnicode,
Reserved,
ReservedUnicode,
Everything,
}
Expand description
Policies for escaping logic
Variants
Nothing
escape absolutely nothing (dangerous)
Basics
only escape the most necessary things
BasicsUnicode
escape basics and non-ascii characters
Reserved
Escape reserved symbols.
ReservedUnicode
Escape reserved symbols and non-ascii characters
Everything
Escape everything that some INI implementations assume
Implementations
sourceimpl EscapePolicy
impl EscapePolicy
sourcepub fn should_escape(self, c: char) -> bool
pub fn should_escape(self, c: char) -> bool
Given a character this returns true if it should be escaped as per this policy or false if not.
Trait Implementations
sourceimpl Clone for EscapePolicy
impl Clone for EscapePolicy
sourcefn clone(&self) -> EscapePolicy
fn clone(&self) -> EscapePolicy
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EscapePolicy
impl Debug for EscapePolicy
sourceimpl PartialEq<EscapePolicy> for EscapePolicy
impl PartialEq<EscapePolicy> for EscapePolicy
impl Copy for EscapePolicy
impl StructuralPartialEq for EscapePolicy
Auto Trait Implementations
impl RefUnwindSafe for EscapePolicy
impl Send for EscapePolicy
impl Sync for EscapePolicy
impl Unpin for EscapePolicy
impl UnwindSafe for EscapePolicy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more