[−][src]Struct unqlite::Entry
A valid cursor entry of record.
Implementations
impl Entry
[src]
pub fn key(&self) -> Vec<u8>
[src]
Returns the key of record
pub fn value(&self) -> Vec<u8>
[src]
Returns the value
pub fn key_value(&self) -> (Vec<u8>, Vec<u8>)
[src]
Returns the key-value pair
pub fn key_callback(
&self,
func: extern "C" fn(_: *const c_void, _: u32, _: *mut c_void) -> i32,
data: *mut c_void
)
[src]
&self,
func: extern "C" fn(_: *const c_void, _: u32, _: *mut c_void) -> i32,
data: *mut c_void
)
Use mangle function for callback of key.
The callback function should define as this:
ⓘThis example is not tested
#[no_mangle] #[allow(private_no_mangle_fns)] // <-- this should be added to avoid warning pub extern fn print_data(ptr: *const c_void, len: u32, _data: *mut c_void) -> i32 { // Do stuff with (ptr, len) println!("Key/Value length is {}", len); 0 }
pub fn value_callback(
&self,
func: extern "C" fn(_: *const c_void, _: u32, _: *mut c_void) -> i32,
data: *mut c_void
)
[src]
&self,
func: extern "C" fn(_: *const c_void, _: u32, _: *mut c_void) -> i32,
data: *mut c_void
)
Use mangle function for callback of value
pub fn next(self) -> Option<Self>
[src]
Goto next entry.
Returns None
if there's no valid cursors.
pub fn prev(self) -> Option<Self>
[src]
Goto previous entry.
Returns None
if no valid cursors.
pub fn delete(self) -> Option<Self>
[src]
Delete the pointed record.
Auto Trait Implementations
impl RefUnwindSafe for Entry
impl !Send for Entry
impl !Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,