extendr_api::prelude::reborrow

Trait AsGeneralizedRef

pub trait AsGeneralizedRef<'short, Target, _Outlives = &'short Self> {
    // Required method
    fn as_generalized_ref(&'short self) -> Target;
}
Expand description

This trait is similar to [std::convert::AsRef], but works with generalized reference types, instead of being limited to native Rust references.

Required Methods§

fn as_generalized_ref(&'short self) -> Target

Implementations on Foreign Types§

§

impl<'short, T, Target> AsGeneralizedRef<'short, Option<Target>> for Option<T>
where T: AsGeneralizedRef<'short, Target>,

§

fn as_generalized_ref(&'short self) -> Option<Target>

Implementors§

§

impl<'short, T, Target> AsGeneralizedRef<'short, &'short Target> for T
where T: AsRef<Target> + ?Sized, Target: ?Sized,