pub fn find_leaf(
        &self,
        key: SliceData,
        next: bool,
        eq: bool,
        signed_int: bool,
        gas_consumer: &mut dyn GasConsumer
    ) -> Result<Option<(BuilderData, SliceData)>> {
        Self::check_key_fail(self.bit_len, &key)?;
        match self.data() {
            Some(root) => {
                let mut path = BuilderData::new();
                let next_index = match next {
                    true => 0,
                    false => 1,
                };
                let result = find_leaf::<Self>(root.clone(), &mut path, self.bit_len, key, next_index, eq, signed_int, gas_consumer)?;
                Ok(result.map(|value| (path, value)))
            }
            None => Ok(None)
        }
    }
/// gets next/this or previous leaf
gets next/this or previous leaf
gets next / this or previous leaf
pub fn find_leaf(
        &self,
        key: SliceData,
        next: bool,
        eq: bool,
        signed_int: bool,
        gas_consumer: &mut dyn GasConsumer
    ) -> Result<Option<(BuilderData, SliceData)>> {
        Self::check_key_fail(self.bit_len, &key)?;
        match self.data() {
            Some(root) => {
                let mut path = BuilderData::new();
                let next_index = match next {
                    true => 0,
                    false => 1,
                };
                let result = find_leaf::<Self>(root.clone(), &mut path, self.bit_len, key, next_index, eq, signed_int, gas_consumer)?;
                Ok(result.map(|value| (path, value)))
            }
            None => Ok(None)
        }
    }
pub fn find_leaf ( & self , key : SliceData , next : bool , eq : bool , signed_int : bool , gas_consumer : & mut dyn GasConsumer ) -> Result < Option < ( BuilderData , SliceData ) > > { Self :: check_key_fail ( self . bit_len , & key ) ? ; match self . data ( ) { Some ( root ) => { let mut path = BuilderData :: new ( ) ; let next_index = match next { true => 0 , false => 1 , } ; let result = find_leaf :: < Self > ( root . clone ( ) , & mut path , self . bit_len , key , next_index , eq , signed_int , gas_consumer ) ? ; Ok ( result . map ( | value | ( path , value ) ) ) } None => Ok ( None ) } }
gets next/this or previous leaf
gets next / this or previous leaf
&self
key
SliceData
next
bool
eq
bool
signed_int
bool
gas_consumer
&mut dyn GasConsumer
&self
key
SliceData
next
bool
eq
bool
signed_int
bool
gas_consumer
&mut dyn GasConsumer