Trait tikv_client::IntoOwnedRange [−][src]
pub trait IntoOwnedRange { 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
fn into_owned(self) -> BoundRange
[src]
Expand description
Transform a borrowed range of some form into an owned BoundRange
.
Implementations on Foreign Types
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for Range<&U>
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for Range<&U>
[src]fn into_owned(self) -> BoundRange
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for RangeFrom<&U>
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for RangeFrom<&U>
[src]fn into_owned(self) -> BoundRange
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for RangeTo<&U>
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for RangeTo<&U>
[src]fn into_owned(self) -> BoundRange
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for RangeInclusive<&U>
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for RangeInclusive<&U>
[src]fn into_owned(self) -> BoundRange
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for RangeToInclusive<&U>
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for RangeToInclusive<&U>
[src]fn into_owned(self) -> BoundRange
[src]
impl IntoOwnedRange for RangeFull
[src]
impl IntoOwnedRange for RangeFull
[src]fn into_owned(self) -> BoundRange
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for (&U, Option<&U>)
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for (&U, Option<&U>)
[src]fn into_owned(self) -> BoundRange
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for (&U, &U)
[src]
impl<T: Into<Key> + Borrow<U>, U: ToOwned<Owned = T> + ?Sized> IntoOwnedRange for (&U, &U)
[src]