Trait tikv_client::IntoOwnedRange
source · pub trait IntoOwnedRange {
// Required method
fn into_owned(self) -> BoundRange;
}
Expand description
A convenience trait for converting ranges of borrowed types into a BoundRange
.
Examples
let r1: Range<&str> = "s".."e";
let r1: BoundRange = r1.into_owned();
let r2: RangeFrom<&str> = "start"..;
let r2: BoundRange = r2.into_owned();
let r3: RangeInclusive<&str> = "s"..="e";
let r3: BoundRange = r3.into_owned();
let r4: RangeTo<&str> = .."z";
let r4: BoundRange = r4.into_owned();
let k1: Vec<u8> = "start".to_owned().into_bytes();
let k2: Vec<u8> = "end".to_owned().into_bytes();
let r4: BoundRange = (&k1, &k2).into_owned();
let r5: BoundRange = (&k1, None).into_owned();
let r6: BoundRange = (&k1, Some(&k2)).into_owned();
Required Methods§
sourcefn into_owned(self) -> BoundRange
fn into_owned(self) -> BoundRange
Transform a borrowed range of some form into an owned BoundRange
.