Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rust-rocksdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangzongwu
rust-rocksdb
Commits
7e21e222
Unverified
Commit
7e21e222
authored
Mar 27, 2018
by
Huachao Huang
Committed by
GitHub
Mar 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some common derived traits (#197)
parent
68dd9d1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
lib.rs
librocksdb_sys/src/lib.rs
+11
-11
No files found.
librocksdb_sys/src/lib.rs
View file @
7e21e222
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
// limitations under the License.
// limitations under the License.
//
//
extern
crate
bzip2_sys
;
extern
crate
libc
;
extern
crate
libc
;
#[cfg(test)]
#[cfg(test)]
extern
crate
tempdir
;
extern
crate
tempdir
;
extern
crate
bzip2_sys
;
use
libc
::{
c_char
,
c_double
,
c_int
,
c_uchar
,
c_void
,
size_t
,
uint32_t
,
uint64_t
,
uint8_t
};
use
libc
::{
c_char
,
c_double
,
c_int
,
c_uchar
,
c_void
,
size_t
,
uint32_t
,
uint64_t
,
uint8_t
};
use
std
::
ffi
::
CStr
;
use
std
::
ffi
::
CStr
;
...
@@ -80,7 +80,7 @@ pub fn new_cache(
...
@@ -80,7 +80,7 @@ pub fn new_cache(
unsafe
{
crocksdb_cache_create_lru
(
capacity
,
shard_bits
,
capacity_limit
,
pri_ratio
)
}
unsafe
{
crocksdb_cache_create_lru
(
capacity
,
shard_bits
,
capacity_limit
,
pri_ratio
)
}
}
}
#[derive(
PartialEq,
Eq,
Clone,
Copy,
Debug
)]
#[derive(
Copy,
Clone,
Debug,
Eq,
PartialEq
)]
#[repr(C)]
#[repr(C)]
pub
enum
DBEntryType
{
pub
enum
DBEntryType
{
Put
=
0
,
Put
=
0
,
...
@@ -90,7 +90,7 @@ pub enum DBEntryType {
...
@@ -90,7 +90,7 @@ pub enum DBEntryType {
Other
=
4
,
Other
=
4
,
}
}
#[derive(Copy,
Clone,
Debug,
PartialEq)]
#[derive(Copy,
Clone,
Debug,
Eq,
PartialEq)]
#[repr(C)]
#[repr(C)]
pub
enum
DBCompressionType
{
pub
enum
DBCompressionType
{
No
=
0
,
No
=
0
,
...
@@ -105,7 +105,7 @@ pub enum DBCompressionType {
...
@@ -105,7 +105,7 @@ pub enum DBCompressionType {
Disable
=
0xff
,
Disable
=
0xff
,
}
}
#[derive(
Debug
)]
#[derive(
Copy,
Clone,
Debug,
Eq,
PartialEq
)]
#[repr(C)]
#[repr(C)]
pub
enum
DBCompactionStyle
{
pub
enum
DBCompactionStyle
{
Level
=
0
,
Level
=
0
,
...
@@ -114,14 +114,14 @@ pub enum DBCompactionStyle {
...
@@ -114,14 +114,14 @@ pub enum DBCompactionStyle {
None
=
3
,
None
=
3
,
}
}
#[derive(
Debug
)]
#[derive(
Copy,
Clone,
Debug,
Eq,
PartialEq
)]
#[repr(C)]
#[repr(C)]
pub
enum
DBUniversalCompactionStyle
{
pub
enum
DBUniversalCompactionStyle
{
SimilarSize
=
0
,
SimilarSize
=
0
,
TotalSize
=
1
,
TotalSize
=
1
,
}
}
#[derive(Copy,
Clone,
PartialEq,
Debug
)]
#[derive(Copy,
Clone,
Debug,
Eq,
PartialEq
)]
#[repr(C)]
#[repr(C)]
pub
enum
DBRecoveryMode
{
pub
enum
DBRecoveryMode
{
TolerateCorruptedTailRecords
=
0
,
TolerateCorruptedTailRecords
=
0
,
...
@@ -130,7 +130,7 @@ pub enum DBRecoveryMode {
...
@@ -130,7 +130,7 @@ pub enum DBRecoveryMode {
SkipAnyCorruptedRecords
=
3
,
SkipAnyCorruptedRecords
=
3
,
}
}
#[derive(Copy,
Clone,
PartialEq,
Debug
)]
#[derive(Copy,
Clone,
Debug,
Eq,
PartialEq
)]
#[repr(C)]
#[repr(C)]
pub
enum
CompactionPriority
{
pub
enum
CompactionPriority
{
// In Level-based compaction, it Determines which file from a level to be
// In Level-based compaction, it Determines which file from a level to be
...
@@ -150,7 +150,7 @@ pub enum CompactionPriority {
...
@@ -150,7 +150,7 @@ pub enum CompactionPriority {
MinOverlappingRatio
=
3
,
MinOverlappingRatio
=
3
,
}
}
#[derive(Copy,
Clone,
Debug)]
#[derive(Copy,
Clone,
Debug
,
Eq,
PartialEq
)]
#[repr(C)]
#[repr(C)]
pub
enum
DBStatisticsTickerType
{
pub
enum
DBStatisticsTickerType
{
BlockCacheMiss
=
0
,
// total block cache miss
BlockCacheMiss
=
0
,
// total block cache miss
...
@@ -221,7 +221,7 @@ pub enum DBStatisticsTickerType {
...
@@ -221,7 +221,7 @@ pub enum DBStatisticsTickerType {
ReadAmpTotalReadBytes
=
92
,
// total size of loaded data blocks
ReadAmpTotalReadBytes
=
92
,
// total size of loaded data blocks
}
}
#[derive(Copy,
Clone,
Debug)]
#[derive(Copy,
Clone,
Debug
,
Eq,
PartialEq
)]
#[repr(C)]
#[repr(C)]
pub
enum
DBStatisticsHistogramType
{
pub
enum
DBStatisticsHistogramType
{
GetMicros
=
0
,
GetMicros
=
0
,
...
@@ -257,7 +257,7 @@ pub enum DBStatisticsHistogramType {
...
@@ -257,7 +257,7 @@ pub enum DBStatisticsHistogramType {
ReadNumMergeOperands
=
30
,
ReadNumMergeOperands
=
30
,
}
}
#[derive(Copy,
Clone,
Debug)]
#[derive(Copy,
Clone,
Debug
,
Eq,
PartialEq
)]
#[repr(C)]
#[repr(C)]
pub
enum
DBInfoLogLevel
{
pub
enum
DBInfoLogLevel
{
Debug
=
0
,
Debug
=
0
,
...
@@ -269,7 +269,7 @@ pub enum DBInfoLogLevel {
...
@@ -269,7 +269,7 @@ pub enum DBInfoLogLevel {
NumInfoLog
=
6
,
NumInfoLog
=
6
,
}
}
#[derive(Copy,
Clone,
Eq,
PartialEq,
Debug
)]
#[derive(Copy,
Clone,
Debug,
Eq,
PartialEq
)]
#[repr(C)]
#[repr(C)]
pub
enum
DBTableProperty
{
pub
enum
DBTableProperty
{
DataSize
=
1
,
DataSize
=
1
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment