intuicio_data::managed

Struct ManagedRef

Source
pub struct ManagedRef<T: ?Sized> { /* private fields */ }

Implementations§

Source§

impl<T: ?Sized> ManagedRef<T>

Source

pub fn new(data: &T, lifetime: LifetimeRef) -> Self

Source

pub unsafe fn new_raw(data: *const T, lifetime: LifetimeRef) -> Option<Self>

§Safety
Source

pub fn make(data: &T) -> (Self, Lifetime)

Source

pub unsafe fn make_raw(data: *const T) -> Option<(Self, Lifetime)>

§Safety
Source

pub fn into_inner(self) -> (LifetimeRef, *const T)

Source

pub fn into_dynamic(self) -> DynamicManagedRef

Source

pub fn lifetime(&self) -> &LifetimeRef

Source

pub fn borrow(&self) -> Option<ManagedRef<T>>

Source

pub fn read(&self) -> Option<ValueReadAccess<'_, T>>

Source

pub unsafe fn map<U>(self, f: impl FnOnce(&T) -> &U) -> ManagedRef<U>

§Safety
Source

pub unsafe fn try_map<U>( self, f: impl FnOnce(&T) -> Option<&U>, ) -> Option<ManagedRef<U>>

§Safety
Source

pub unsafe fn as_ptr(&self) -> Option<*const T>

§Safety

Trait Implementations§

Source§

impl<T> From<ManagedRef<T>> for ManagedValue<T>

Source§

fn from(value: ManagedRef<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> TryFrom<ManagedValue<T>> for ManagedRef<T>

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(value: ManagedValue<T>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T> Send for ManagedRef<T>
where T: Send + ?Sized,

Source§

impl<T> Sync for ManagedRef<T>
where T: Sync + ?Sized,

Auto Trait Implementations§

§

impl<T> Freeze for ManagedRef<T>
where T: ?Sized,

§

impl<T> RefUnwindSafe for ManagedRef<T>
where T: RefUnwindSafe + ?Sized,

§

impl<T> Unpin for ManagedRef<T>
where T: ?Sized,

§

impl<T> UnwindSafe for ManagedRef<T>
where T: RefUnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Finalize for T

Source§

unsafe fn finalize_raw(data: *mut ())

Safety Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.