mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-24 18:01:37 +08:00
Add #[derive(Clone, Copy...
on some bitflags / enum (#1396)
This will make it easier to use them, e.g. I won't need to re-create `FunctionFlags` for registering multiple similar functions.
This commit is contained in:
parent
ff902751c0
commit
68c3083e34
@ -9,6 +9,7 @@ use crate::{Connection, Result};
|
||||
/// Database Connection Configuration Options
|
||||
/// See [Database Connection Configuration Options](https://sqlite.org/c3ref/c_dbconfig_enable_fkey.html) for details.
|
||||
#[repr(i32)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[allow(non_snake_case, non_camel_case_types)]
|
||||
#[non_exhaustive]
|
||||
#[allow(clippy::upper_case_acronyms)]
|
||||
|
@ -311,6 +311,7 @@ bitflags::bitflags! {
|
||||
/// Function Flags.
|
||||
/// See [sqlite3_create_function](https://sqlite.org/c3ref/create_function.html)
|
||||
/// and [Function Flags](https://sqlite.org/c3ref/c_deterministic.html) for details.
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
#[repr(C)]
|
||||
pub struct FunctionFlags: ::std::os::raw::c_int {
|
||||
/// Specifies UTF-8 as the text encoding this SQL function prefers for its parameters.
|
||||
|
@ -9,6 +9,7 @@ use std::os::raw::c_int;
|
||||
/// See the official documentation for more information:
|
||||
/// - <https://www.sqlite.org/c3ref/c_limit_attached.html>
|
||||
/// - <https://www.sqlite.org/limits.html>
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[repr(i32)]
|
||||
#[non_exhaustive]
|
||||
#[allow(clippy::upper_case_acronyms, non_camel_case_types)]
|
||||
|
@ -111,7 +111,7 @@ pub struct Null;
|
||||
|
||||
/// SQLite data types.
|
||||
/// See [Fundamental Datatypes](https://sqlite.org/c3ref/c_blob.html).
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub enum Type {
|
||||
/// NULL
|
||||
Null,
|
||||
|
@ -373,6 +373,7 @@ bitflags::bitflags! {
|
||||
/// Virtual table scan flags
|
||||
/// See [Function Flags](https://sqlite.org/c3ref/c_index_scan_unique.html) for details.
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct IndexFlags: ::std::os::raw::c_int {
|
||||
/// Default
|
||||
const NONE = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user