#[repr(C)]pub struct FlexRc<META, META2, T>{ /* private fields */ }Implementations§
Source§impl<META, META2, T> FlexRc<META, META2, [T]>
impl<META, META2, T> FlexRc<META, META2, [T]>
pub fn new_slice_uninit(len: usize) -> FlexRc<META, META2, [MaybeUninit<T>]>
pub fn from_slice(data: &[T]) -> Self
Source§impl<META, META2, T> FlexRc<META, META2, [MaybeUninit<T>]>
impl<META, META2, T> FlexRc<META, META2, [MaybeUninit<T>]>
Sourcepub unsafe fn assume_init(self) -> FlexRc<META, META2, [T]>
pub unsafe fn assume_init(self) -> FlexRc<META, META2, [T]>
§Safety
We have unique ownership. We are trusting the user that this memory has been initialized (thus why it is an unsafe function)
Source§impl<META, META2, T> FlexRc<META, META2, T>
impl<META, META2, T> FlexRc<META, META2, T>
Sourcepub fn try_into_other(self) -> Result<FlexRc<META2, META, T>, Self>
pub fn try_into_other(self) -> Result<FlexRc<META2, META, T>, Self>
Try to convert this into a type with the other type of metadata for the pair (local -> shared, or shared -> local). If it is possible it will return the new type, else it will fail and return itself instead
Sourcepub fn into_other(self) -> FlexRc<META2, META, T>where
T: Clone,
pub fn into_other(self) -> FlexRc<META2, META, T>where
T: Clone,
Try to convert this into a type with the other type of metadata for the pair (local -> shared, or shared -> local). If it is possible it will return the new type without additional copy or allocation, but if not possible, it will clone the underlying data and return a new Rc
Sourcepub fn try_to_other(&self) -> Result<FlexRc<META2, META, T>, &Self>
pub fn try_to_other(&self) -> Result<FlexRc<META2, META, T>, &Self>
Try to create another instance of this Rc with the other type of metadata for the pair (local -> shared, or shared -> local). If it is possible to create this new instance without allocation or copying it will return it, else it will fail and return a ref to the same instance
Sourcepub fn to_other(&self) -> FlexRc<META2, META, T>where
T: Clone,
pub fn to_other(&self) -> FlexRc<META2, META, T>where
T: Clone,
Try to create another instance of this Rc with the other type of metadata for the pair (local -> shared, or shared -> local). If it is possible to create this new instance without allocation or copying it will return it, else it clone the underlying data and return a new Rc