pub struct WriteOptions { /* private fields */ }Implementations§
Source§impl WriteOptions
impl WriteOptions
pub const NO_OPTIONS: WriteOptions
pub const HINT_MANY_WRITES_EXPECTED: WriteOptions
pub const NO_NULL_TERMINATION: WriteOptions
pub const PRESERVE_ONE_BYTE_NULL: WriteOptions
pub const REPLACE_INVALID_UTF8: WriteOptions
Sourcepub const fn empty() -> WriteOptions
pub const fn empty() -> WriteOptions
Returns an empty set of flags
Sourcepub const fn all() -> WriteOptions
pub const fn all() -> WriteOptions
Returns the set containing all flags.
Sourcepub fn from_bits(bits: int) -> Option<WriteOptions>
pub fn from_bits(bits: int) -> Option<WriteOptions>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: int) -> WriteOptions
pub const fn from_bits_truncate(bits: int) -> WriteOptions
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: int) -> WriteOptions
pub const unsafe fn from_bits_unchecked(bits: int) -> WriteOptions
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: WriteOptions) -> bool
pub const fn intersects(&self, other: WriteOptions) -> bool
Returns true if there are flags common to both self and other.
Sourcepub const fn contains(&self, other: WriteOptions) -> bool
pub const fn contains(&self, other: WriteOptions) -> bool
Returns true all of the flags in other are contained within self.
Sourcepub fn insert(&mut self, other: WriteOptions)
pub fn insert(&mut self, other: WriteOptions)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: WriteOptions)
pub fn remove(&mut self, other: WriteOptions)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: WriteOptions)
pub fn toggle(&mut self, other: WriteOptions)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: WriteOptions, value: bool)
pub fn set(&mut self, other: WriteOptions, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for WriteOptions
impl Binary for WriteOptions
Source§impl BitAnd for WriteOptions
impl BitAnd for WriteOptions
Source§fn bitand(self, other: WriteOptions) -> WriteOptions
fn bitand(self, other: WriteOptions) -> WriteOptions
Returns the intersection between the two sets of flags.
Source§type Output = WriteOptions
type Output = WriteOptions
& operator.Source§impl BitAndAssign for WriteOptions
impl BitAndAssign for WriteOptions
Source§fn bitand_assign(&mut self, other: WriteOptions)
fn bitand_assign(&mut self, other: WriteOptions)
Disables all flags disabled in the set.
Source§impl BitOr for WriteOptions
impl BitOr for WriteOptions
Source§fn bitor(self, other: WriteOptions) -> WriteOptions
fn bitor(self, other: WriteOptions) -> WriteOptions
Returns the union of the two sets of flags.
Source§type Output = WriteOptions
type Output = WriteOptions
| operator.Source§impl BitOrAssign for WriteOptions
impl BitOrAssign for WriteOptions
Source§fn bitor_assign(&mut self, other: WriteOptions)
fn bitor_assign(&mut self, other: WriteOptions)
Adds the set of flags.
Source§impl BitXor for WriteOptions
impl BitXor for WriteOptions
Source§fn bitxor(self, other: WriteOptions) -> WriteOptions
fn bitxor(self, other: WriteOptions) -> WriteOptions
Returns the left flags, but with all the right flags toggled.
Source§type Output = WriteOptions
type Output = WriteOptions
^ operator.Source§impl BitXorAssign for WriteOptions
impl BitXorAssign for WriteOptions
Source§fn bitxor_assign(&mut self, other: WriteOptions)
fn bitxor_assign(&mut self, other: WriteOptions)
Toggles the set of flags.
Source§impl Clone for WriteOptions
impl Clone for WriteOptions
Source§fn clone(&self) -> WriteOptions
fn clone(&self) -> WriteOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WriteOptions
impl Debug for WriteOptions
Source§impl Default for WriteOptions
impl Default for WriteOptions
Source§fn default() -> WriteOptions
fn default() -> WriteOptions
Source§impl Extend<WriteOptions> for WriteOptions
impl Extend<WriteOptions> for WriteOptions
Source§fn extend<T: IntoIterator<Item = WriteOptions>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = WriteOptions>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl FromIterator<WriteOptions> for WriteOptions
impl FromIterator<WriteOptions> for WriteOptions
Source§fn from_iter<T: IntoIterator<Item = WriteOptions>>(iterator: T) -> WriteOptions
fn from_iter<T: IntoIterator<Item = WriteOptions>>(iterator: T) -> WriteOptions
Source§impl Hash for WriteOptions
impl Hash for WriteOptions
Source§impl LowerHex for WriteOptions
impl LowerHex for WriteOptions
Source§impl Not for WriteOptions
impl Not for WriteOptions
Source§fn not(self) -> WriteOptions
fn not(self) -> WriteOptions
Returns the complement of this set of flags.
Source§type Output = WriteOptions
type Output = WriteOptions
! operator.Source§impl Octal for WriteOptions
impl Octal for WriteOptions
Source§impl Ord for WriteOptions
impl Ord for WriteOptions
Source§fn cmp(&self, other: &WriteOptions) -> Ordering
fn cmp(&self, other: &WriteOptions) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WriteOptions
impl PartialEq for WriteOptions
Source§impl PartialOrd for WriteOptions
impl PartialOrd for WriteOptions
Source§impl Sub for WriteOptions
impl Sub for WriteOptions
Source§fn sub(self, other: WriteOptions) -> WriteOptions
fn sub(self, other: WriteOptions) -> WriteOptions
Returns the set difference of the two sets of flags.
Source§type Output = WriteOptions
type Output = WriteOptions
- operator.Source§impl SubAssign for WriteOptions
impl SubAssign for WriteOptions
Source§fn sub_assign(&mut self, other: WriteOptions)
fn sub_assign(&mut self, other: WriteOptions)
Disables all flags enabled in the set.