pub fn seek<K: AsRef<[u8]>>(&mut self, key: K) {
        let key = key.as_ref();

        unsafe {
            ffi::rocksdb_iter_seek(
                self.inner,
                key.as_ptr() as *const c_char,
                key.len() as size_t,
            );
        }
    }
/// Seeks to the specified key or the first key that lexicographically follows it.
///
/// This method will attempt to seek to the specified key. If that key does not exist, it will
/// find and seek to the key that lexicographically follows it instead.
///
/// # Examples
///
/// ```rust
/// use rocksdb::{DB, Options};
///
/// let path = "_path_for_rocksdb_storage7";
/// {
///     let db = DB::open_default(path).unwrap();
///     let mut iter = db.raw_iterator();
///
///     // Read the first key that starts with 'a'
///     iter.seek(b"a");
///
///     if iter.valid() {
///         println!("{:?} {:?}", iter.key(), iter.value());
///     } else {
///         // There are no keys in the database
///     }
/// }
/// let _ = DB::destroy(&Options::default(), path);
/// ```
Seeks to the specified key or the first key that lexicographically follows it.
This method will attempt to seek to the specified key. If that key does not exist, it will
find and seek to the key that lexicographically follows it instead.
Seeks to the specified key or the first key that lexicographically follows it . This method will attempt to seek to the specified key . If that key does not exist it will find and seek to the key that lexicographically follows it instead .
pub fn seek<K: AsRef<[u8]>>(&mut self, key: K) {
        let key = key.as_ref();
        unsafe {
            ffi::rocksdb_iter_seek(
                self.inner,
                key.as_ptr() as *const c_char,
                key.len() as size_t,
            );
        }
    }
pub fn seek < K : AsRef < [ u8 ] > > ( & mut self , key : K ) { let key = key . as_ref ( ) ; unsafe { ffi :: rocksdb_iter_seek ( self . inner , key . as_ptr ( ) as * const c_char , key . len ( ) as size_t , ) ; } }
Seeks to the specified key or the first key that lexicographically follows it.
Seeks to the specified key or the first key that lexicographically follows it .
&mut self
key
K
&mut self
key
K
examples
```rust
use rocksdb::{DB, Options}.

let path = "_path_for_rocksdb_storage7";
{
let db = DB::open_default(path).unwrap();
let mut iter = db.raw_iterator().

Read the first key that starts with 'a'
iter.seek(b"a").

if iter.valid() {
println!("{:?} {:?}", iter.key(), iter.value());
} else {
There are no keys in the database
}
}
let _ = DB::destroy(&Options::default(), path);
```
` ` ` rust use rocksdb :: { DB Options } . let path = " _path_for_rocksdb_storage7 " ; { let db = DB :: open_default ( path ) . unwrap () ; let mut iter = db . raw_iterator () . Read the first key that starts with ' a ' iter . seek ( b " a " ) . if iter . valid () { println! ( " { : ? } { : ? } " iter . key () iter . value () ) ; } else { There are no keys in the database } } let _ = DB :: destroy ( &Options :: default () path ) ; ` ` `