pub trait RCowCompatibleRef<'a>: ToOwned {
type RefC: IntoOwned<ROwned = Self::ROwned, Target = Self>;
type ROwned: Borrow<Self> + Into<Self::Owned> + From<Self::Owned>;
// Required methods
fn as_c_ref(from: &'a Self) -> Self::RefC;
fn as_rust_ref(from: Self::RefC) -> &'a Self;
}
Expand description
For making a Cow<'a, Self>
convertible into an RCow
.
Required Associated Types§
Required Methods§
Sourcefn as_rust_ref(from: Self::RefC) -> &'a Self
fn as_rust_ref(from: Self::RefC) -> &'a Self
Converts an FFI-safe type to a reference
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.