Struct rusqlite::OpenFlags
[−]
#[repr(C)]pub struct OpenFlags { /* fields omitted */ }
Flags for opening SQLite database connections. See sqlite3_open_v2 for details.
Methods
impl OpenFlags
impl OpenFlags
pub const SQLITE_OPEN_READ_ONLY: OpenFlags
SQLITE_OPEN_READ_ONLY: OpenFlags = OpenFlags{bits: ffi::SQLITE_OPEN_READONLY,}
pub const SQLITE_OPEN_READ_WRITE: OpenFlags
SQLITE_OPEN_READ_WRITE: OpenFlags = OpenFlags{bits: ffi::SQLITE_OPEN_READWRITE,}
pub const SQLITE_OPEN_CREATE: OpenFlags
SQLITE_OPEN_CREATE: OpenFlags = OpenFlags{bits: ffi::SQLITE_OPEN_CREATE,}
pub const SQLITE_OPEN_URI: OpenFlags
SQLITE_OPEN_URI: OpenFlags = OpenFlags{bits: 64,}
pub const SQLITE_OPEN_MEMORY: OpenFlags
SQLITE_OPEN_MEMORY: OpenFlags = OpenFlags{bits: 128,}
pub const SQLITE_OPEN_NO_MUTEX: OpenFlags
SQLITE_OPEN_NO_MUTEX: OpenFlags = OpenFlags{bits: ffi::SQLITE_OPEN_NOMUTEX,}
pub const SQLITE_OPEN_FULL_MUTEX: OpenFlags
SQLITE_OPEN_FULL_MUTEX: OpenFlags = OpenFlags{bits: ffi::SQLITE_OPEN_FULLMUTEX,}
pub const SQLITE_OPEN_SHARED_CACHE: OpenFlags
SQLITE_OPEN_SHARED_CACHE: OpenFlags = OpenFlags{bits: 131072,}
pub const SQLITE_OPEN_PRIVATE_CACHE: OpenFlags
SQLITE_OPEN_PRIVATE_CACHE: OpenFlags = OpenFlags{bits: 262144,}
pub fn empty() -> OpenFlags
pub fn empty() -> OpenFlags
Returns an empty set of flags.
pub fn all() -> OpenFlags
pub fn all() -> OpenFlags
Returns the set containing all flags.
pub fn bits(&self) -> c_int
pub fn bits(&self) -> c_int
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: c_int) -> Option<OpenFlags>
pub fn from_bits(bits: c_int) -> 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_int) -> OpenFlags
pub fn from_bits_truncate(bits: c_int) -> OpenFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: OpenFlags) -> bool
pub fn intersects(&self, other: OpenFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: OpenFlags) -> bool
pub fn contains(&self, other: OpenFlags) -> bool
Returns 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.
pub fn set(&mut self, other: OpenFlags, value: bool)
pub fn set(&mut self, other: OpenFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for OpenFlags
impl Copy for OpenFlags
impl PartialEq for OpenFlags
impl PartialEq for OpenFlags
fn eq(&self, __arg_0: &OpenFlags) -> bool
fn eq(&self, __arg_0: &OpenFlags) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &OpenFlags) -> bool
fn ne(&self, __arg_0: &OpenFlags) -> bool
This method tests for !=
.
impl Eq for OpenFlags
impl Eq for OpenFlags
impl Clone for OpenFlags
impl Clone for OpenFlags
fn clone(&self) -> OpenFlags
fn clone(&self) -> OpenFlags
Returns 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 OpenFlags
fn partial_cmp(&self, __arg_0: &OpenFlags) -> Option<Ordering>
fn partial_cmp(&self, __arg_0: &OpenFlags) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &OpenFlags) -> bool
fn lt(&self, __arg_0: &OpenFlags) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &OpenFlags) -> bool
fn le(&self, __arg_0: &OpenFlags) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &OpenFlags) -> bool
fn gt(&self, __arg_0: &OpenFlags) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &OpenFlags) -> bool
fn ge(&self, __arg_0: &OpenFlags) -> bool
This 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 OpenFlags
fn cmp(&self, __arg_0: &OpenFlags) -> Ordering
fn cmp(&self, __arg_0: &OpenFlags) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for OpenFlags
impl Hash for OpenFlags
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
fn hash<__H: Hasher>(&self, __arg_0: &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 OpenFlags
impl Binary for OpenFlags
impl Binary for OpenFlags
impl Octal for OpenFlags
impl Octal for OpenFlags
impl LowerHex for OpenFlags
impl LowerHex for OpenFlags
impl UpperHex for OpenFlags
impl UpperHex for OpenFlags
impl BitOr for OpenFlags
impl BitOr for OpenFlags
type Output = OpenFlags
The resulting type after applying the |
operator.
fn bitor(self, other: OpenFlags) -> OpenFlags
fn bitor(self, other: OpenFlags) -> OpenFlags
Returns the union of the two sets of flags.
impl BitOrAssign for OpenFlags
impl BitOrAssign for OpenFlags
fn 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 OpenFlags
type Output = OpenFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: OpenFlags) -> OpenFlags
fn bitxor(self, other: OpenFlags) -> OpenFlags
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for OpenFlags
impl BitXorAssign for OpenFlags
fn 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 OpenFlags
type Output = OpenFlags
The resulting type after applying the &
operator.
fn bitand(self, other: OpenFlags) -> OpenFlags
fn bitand(self, other: OpenFlags) -> OpenFlags
Returns the intersection between the two sets of flags.
impl BitAndAssign for OpenFlags
impl BitAndAssign for OpenFlags
fn 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 OpenFlags
type Output = OpenFlags
The resulting type after applying the -
operator.
fn sub(self, other: OpenFlags) -> OpenFlags
fn sub(self, other: OpenFlags) -> OpenFlags
Returns the set difference of the two sets of flags.
impl SubAssign for OpenFlags
impl SubAssign for OpenFlags
fn 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 OpenFlags
type Output = OpenFlags
The resulting type after applying the !
operator.
fn not(self) -> OpenFlags
fn not(self) -> OpenFlags
Returns the complement of this set of flags.
impl Extend<OpenFlags> for OpenFlags
impl Extend<OpenFlags> for OpenFlags
fn 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 OpenFlags
fn from_iter<T: IntoIterator<Item = OpenFlags>>(iterator: T) -> OpenFlags
fn from_iter<T: IntoIterator<Item = OpenFlags>>(iterator: T) -> OpenFlags
Creates a value from an iterator. Read more
impl Default for OpenFlags
[src]
impl Default for OpenFlags