[−][src]Struct flize::Shared
Implementations
impl<'shield, V, T> Shared<'shield, V, T> where
V: 'shield,
T: Tag,
[src]
V: 'shield,
T: Tag,
pub fn null() -> Self
[src]
pub unsafe fn from_ptr(ptr: *mut V) -> Self
[src]
Safety
The alignment of V
must free up sufficient low bits so that T
fits.
pub unsafe fn from_raw(data: usize) -> Self
[src]
This function constructs a Shared<'shield, V, T>
from a raw tagged pointer.
Safety
This is marked unsafe because extreme caution must be taken to supply correct data and ensure the lifetime is what you expect.
pub fn into_raw(self) -> usize
[src]
pub fn as_ptr(&self) -> *mut V
[src]
pub unsafe fn as_ref(&self) -> Option<&'shield V>
[src]
Safety
- The pointer must either be null or point to a valid instance of
V
. - You must ensure the instance of
V
is not borrowed mutably.
pub unsafe fn as_mut_ref(&mut self) -> Option<&'shield mut V>
[src]
Safety
- The pointer must either be null or point to a valid instance of
V
. - You must ensure the instance of
V
is not borrowed.
pub unsafe fn as_ref_unchecked(&self) -> &'shield V
[src]
Safety
- The pointer must point to a valid instance of
V
. - You must ensure the instance of
V
is not borrowed mutably.
pub unsafe fn as_mut_ref_unchecked(&mut self) -> &'shield mut V
[src]
Safety
- The pointer must point to a valid instance of
V
. - You must ensure the instance of
V
is not borrowed.
pub fn is_null(&self) -> bool
[src]
pub fn tag(&self) -> T
[src]
pub fn with_tag(&self, tag: T) -> Self
[src]
Trait Implementations
impl<'shield, V: Clone, T: Clone> Clone for Shared<'shield, V, T> where
V: 'shield,
T: Tag,
[src]
V: 'shield,
T: Tag,
impl<'shield, V: Copy, T: Copy> Copy for Shared<'shield, V, T> where
V: 'shield,
T: Tag,
[src]
V: 'shield,
T: Tag,
impl<'shield, V: Debug, T: Debug> Debug for Shared<'shield, V, T> where
V: 'shield,
T: Tag,
[src]
V: 'shield,
T: Tag,
impl<'shield, V: Eq, T: Eq> Eq for Shared<'shield, V, T> where
V: 'shield,
T: Tag,
[src]
V: 'shield,
T: Tag,
impl<'shield, V: PartialEq, T: PartialEq> PartialEq<Shared<'shield, V, T>> for Shared<'shield, V, T> where
V: 'shield,
T: Tag,
[src]
V: 'shield,
T: Tag,
fn eq(&self, other: &Shared<'shield, V, T>) -> bool
[src]
fn ne(&self, other: &Shared<'shield, V, T>) -> bool
[src]
impl<'shield, V, T> StructuralEq for Shared<'shield, V, T> where
V: 'shield,
T: Tag,
[src]
V: 'shield,
T: Tag,
impl<'shield, V, T> StructuralPartialEq for Shared<'shield, V, T> where
V: 'shield,
T: Tag,
[src]
V: 'shield,
T: Tag,
Auto Trait Implementations
impl<'shield, V, T> RefUnwindSafe for Shared<'shield, V, T> where
T: RefUnwindSafe,
V: RefUnwindSafe,
T: RefUnwindSafe,
V: RefUnwindSafe,
impl<'shield, V, T> Send for Shared<'shield, V, T> where
T: Send,
V: Send,
T: Send,
V: Send,
impl<'shield, V, T> Sync for Shared<'shield, V, T> where
T: Sync,
V: Sync,
T: Sync,
V: Sync,
impl<'shield, V, T> Unpin for Shared<'shield, V, T> where
T: Unpin,
V: Unpin,
T: Unpin,
V: Unpin,
impl<'shield, V, T> UnwindSafe for Shared<'shield, V, T> where
T: UnwindSafe,
V: UnwindSafe,
T: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,