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§
source§impl 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§
source§impl Clone for EscapePolicy
impl Clone for EscapePolicy
source§fn clone(&self) -> EscapePolicy
fn clone(&self) -> EscapePolicy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EscapePolicy
impl Debug for EscapePolicy
source§impl PartialEq<EscapePolicy> for EscapePolicy
impl PartialEq<EscapePolicy> for EscapePolicy
source§fn eq(&self, other: &EscapePolicy) -> bool
fn eq(&self, other: &EscapePolicy) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§
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