pub fn pred_incl(
        &self,
        k: &T::Key,
    ) -> impl Future<Item = Option<(T::Key, T::Value)>, Error = Error>
    where
        T::Key: PartialEq,
    {
        let client = self.client.clone();
        write_key_future::<T>(k)
            .and_then(move |key_bytes| client.pred_incl(key_bytes).map_err(Error::SledWeb))
            .join(write_id_future(&T::ID))
            .and_then(move |(opt, id_bytes)| {
                let id_len = id_bytes.len();
                opt.and_then(|(id_k, v)| {
                    let (id, k) = id_k.split_at(id_len);
                    match id == &id_bytes[..] {
                        true => Some(entry_from_bytes_future::<T>(k, &v)),
                        false => None,
                    }
                })
            })
    }
/// Return the entry that matches or precedes the given key.
///
/// Returns `None` if no such key exists.
Return the entry that matches or precedes the given key.
Returns `None` if no such key exists.
Return the entry that matches or precedes the given key . Returns ` None ` if no such key exists .
pub fn pred_incl(
        &self,
        k: &T::Key,
    ) -> impl Future<Item = Option<(T::Key, T::Value)>, Error = Error>
    where
        T::Key: PartialEq,
    {
        let client = self.client.clone();
        write_key_future::<T>(k)
            .and_then(move |key_bytes| client.pred_incl(key_bytes).map_err(Error::SledWeb))
            .join(write_id_future(&T::ID))
            .and_then(move |(opt, id_bytes)| {
                let id_len = id_bytes.len();
                opt.and_then(|(id_k, v)| {
                    let (id, k) = id_k.split_at(id_len);
                    match id == &id_bytes[..] {
                        true => Some(entry_from_bytes_future::<T>(k, &v)),
                        false => None,
                    }
                })
            })
    }
pub fn pred_incl ( & self , k : & T :: Key , ) -> impl Future < Item = Option < ( T :: Key , T :: Value ) > , Error = Error > where T :: Key : PartialEq , { let client = self . client . clone ( ) ; write_key_future :: < T > ( k ) . and_then ( move | key_bytes | client . pred_incl ( key_bytes ) . map_err ( Error :: SledWeb ) ) . join ( write_id_future ( & T :: ID ) ) . and_then ( move | ( opt , id_bytes ) | { let id_len = id_bytes . len ( ) ; opt . and_then ( | ( id_k , v ) | { let ( id , k ) = id_k . split_at ( id_len ) ; match id == & id_bytes [ .. ] { true => Some ( entry_from_bytes_future :: < T > ( k , & v ) ) , false => None , } } ) } ) }
Return the entry that matches or precedes the given key.
Return the entry that matches or precedes the given key .
&self
k
&T::Key
&self
k
&T::Key