Struct ssh2::OpenFlags [−]
pub struct OpenFlags { /* fields omitted */ }Options that can be used to configure how a file is opened
Methods
impl OpenFlags
impl OpenFlagspub fn empty() -> OpenFlags
pub fn empty() -> OpenFlagsReturns an empty set of flags.
pub fn all() -> OpenFlags
pub fn all() -> OpenFlagsReturns the set containing all flags.
pub fn bits(&self) -> c_ulong
pub fn bits(&self) -> c_ulongReturns the raw value of the flags currently stored.
pub fn from_bits(bits: c_ulong) -> Option<OpenFlags>
pub fn from_bits(bits: c_ulong) -> Option<OpenFlags>Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: c_ulong) -> OpenFlags
pub fn from_bits_truncate(bits: c_ulong) -> OpenFlagsConvert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> boolReturns true if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> boolReturns true if all flags are currently set.
pub fn intersects(&self, other: OpenFlags) -> bool
pub fn intersects(&self, other: OpenFlags) -> boolReturns true if there are flags common to both self and other.
pub fn contains(&self, other: OpenFlags) -> bool
pub fn contains(&self, other: OpenFlags) -> boolReturns true all of the flags in other are contained within self.
pub fn insert(&mut self, other: OpenFlags)
pub fn insert(&mut self, other: OpenFlags)Inserts the specified flags in-place.
pub fn remove(&mut self, other: OpenFlags)
pub fn remove(&mut self, other: OpenFlags)Removes the specified flags in-place.
pub fn toggle(&mut self, other: OpenFlags)
pub fn toggle(&mut self, other: OpenFlags)Toggles the specified flags in-place.
Trait Implementations
impl Copy for OpenFlags
impl Copy for OpenFlagsimpl PartialEq for OpenFlags
impl PartialEq for OpenFlagsfn eq(&self, other: &OpenFlags) -> bool
fn eq(&self, other: &OpenFlags) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &OpenFlags) -> bool
fn ne(&self, other: &OpenFlags) -> boolThis method tests for !=.
impl Eq for OpenFlags
impl Eq for OpenFlagsimpl Clone for OpenFlags
impl Clone for OpenFlagsfn clone(&self) -> OpenFlags
fn clone(&self) -> OpenFlagsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialOrd for OpenFlags
impl PartialOrd for OpenFlagsfn partial_cmp(&self, other: &OpenFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &OpenFlags) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &OpenFlags) -> bool
fn lt(&self, other: &OpenFlags) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &OpenFlags) -> bool
fn le(&self, other: &OpenFlags) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &OpenFlags) -> bool
fn gt(&self, other: &OpenFlags) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &OpenFlags) -> bool
fn ge(&self, other: &OpenFlags) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for OpenFlags
impl Ord for OpenFlagsfn cmp(&self, other: &OpenFlags) -> Ordering
fn cmp(&self, other: &OpenFlags) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Hash for OpenFlags
impl Hash for OpenFlagsfn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for OpenFlags
impl Debug for OpenFlagsimpl BitOr for OpenFlags
impl BitOr for OpenFlagstype Output = OpenFlags
The resulting type after applying the | operator.
fn bitor(self, other: OpenFlags) -> OpenFlags
fn bitor(self, other: OpenFlags) -> OpenFlagsReturns the union of the two sets of flags.
impl BitOrAssign for OpenFlags
impl BitOrAssign for OpenFlagsfn bitor_assign(&mut self, other: OpenFlags)
fn bitor_assign(&mut self, other: OpenFlags)Adds the set of flags.
impl BitXor for OpenFlags
impl BitXor for OpenFlagstype Output = OpenFlags
The resulting type after applying the ^ operator.
fn bitxor(self, other: OpenFlags) -> OpenFlags
fn bitxor(self, other: OpenFlags) -> OpenFlagsReturns the left flags, but with all the right flags toggled.
impl BitXorAssign for OpenFlags
impl BitXorAssign for OpenFlagsfn bitxor_assign(&mut self, other: OpenFlags)
fn bitxor_assign(&mut self, other: OpenFlags)Toggles the set of flags.
impl BitAnd for OpenFlags
impl BitAnd for OpenFlagstype Output = OpenFlags
The resulting type after applying the & operator.
fn bitand(self, other: OpenFlags) -> OpenFlags
fn bitand(self, other: OpenFlags) -> OpenFlagsReturns the intersection between the two sets of flags.
impl BitAndAssign for OpenFlags
impl BitAndAssign for OpenFlagsfn bitand_assign(&mut self, other: OpenFlags)
fn bitand_assign(&mut self, other: OpenFlags)Disables all flags disabled in the set.
impl Sub for OpenFlags
impl Sub for OpenFlagstype Output = OpenFlags
The resulting type after applying the - operator.
fn sub(self, other: OpenFlags) -> OpenFlags
fn sub(self, other: OpenFlags) -> OpenFlagsReturns the set difference of the two sets of flags.
impl SubAssign for OpenFlags
impl SubAssign for OpenFlagsfn sub_assign(&mut self, other: OpenFlags)
fn sub_assign(&mut self, other: OpenFlags)Disables all flags enabled in the set.
impl Not for OpenFlags
impl Not for OpenFlagstype Output = OpenFlags
The resulting type after applying the ! operator.
fn not(self) -> OpenFlags
fn not(self) -> OpenFlagsReturns the complement of this set of flags.
impl Extend<OpenFlags> for OpenFlags
impl Extend<OpenFlags> for OpenFlagsfn extend<T: IntoIterator<Item = OpenFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = OpenFlags>>(&mut self, iterator: T)Extends a collection with the contents of an iterator. Read more
impl FromIterator<OpenFlags> for OpenFlags
impl FromIterator<OpenFlags> for OpenFlagsfn from_iter<T: IntoIterator<Item = OpenFlags>>(iterator: T) -> OpenFlags
fn from_iter<T: IntoIterator<Item = OpenFlags>>(iterator: T) -> OpenFlagsCreates a value from an iterator. Read more