Trait rental::IntoSuffix
[−]
[src]
pub trait IntoSuffix { type Suffix; fn into_suffix(self) -> Self::Suffix; }
This trait converts any *_Borrow
or *_BorrowMut
structs generated by the rental
macro into their suffix (most dependent) field.
When you own a borrow struct, such as in the body of the closure provided to the rent_all
or ref_rent_all
methods of a rental struct, you can call into_suffix()
to discard the borrow struct and obtain the suffix field if you don't need any of the other fields.
Associated Types
type Suffix
Type of the transitive suffix of the borrow struct.
If the suffix field of the borrow struct is itself a borrow struct of a subrental, then this type is the suffix of that nested borrow struct, recursively.
Required Methods
fn into_suffix(self) -> Self::Suffix
Discard the borrow struct and return the transitive suffix field.
If the suffix field of the borrow struct is itself a borrow struct of a subrental, then this function will return the nested suffix of that borrow struct, recursively.
Implementors
impl<'head: 'suffix, 'suffix, T: 'static, U: 'static> IntoSuffix for RentRef_Borrow<'head, 'suffix, T, U>
impl<'head: 'suffix, 'suffix, T: 'static, U: 'static> IntoSuffix for RentRef_BorrowMut<'head, 'suffix, T, U>
impl<'head: 'suffix, 'suffix, T: 'static, U: 'static> IntoSuffix for RentMut_Borrow<'head, 'suffix, T, U>
impl<'head: 'suffix, 'suffix, T: 'static, U: 'static> IntoSuffix for RentMut_BorrowMut<'head, 'suffix, T, U>
impl<'head_0: 'head_1, 'head_1: 'suffix, 'suffix, T: 'static, U: 'static, V: 'static> IntoSuffix for RentRefMap_Borrow<'head_0, 'head_1, 'suffix, T, U, V>
impl<'head_0: 'head_1, 'head_1: 'suffix, 'suffix, T: 'static, U: 'static, V: 'static> IntoSuffix for RentRefMap_BorrowMut<'head_0, 'head_1, 'suffix, T, U, V>
impl<'head_0: 'head_1, 'head_1: 'suffix, 'suffix, T: 'static, U: 'static, V: 'static> IntoSuffix for RentMutMap_Borrow<'head_0, 'head_1, 'suffix, T, U, V>
impl<'head_0: 'head_1, 'head_1: 'suffix, 'suffix, T: 'static, U: 'static, V: 'static> IntoSuffix for RentMutMap_BorrowMut<'head_0, 'head_1, 'suffix, T, U, V>