[−][src]Struct pgc::Gc
A garbage-collected pointer type
Methods
impl<T: Sized + GcObject + 'static> Gc<T>
[src]
pub fn new(val: T) -> Self
[src]
Constructs a new Gc<T>
with the given value.
Collection
This method could trigger a garbage collection.
impl<T: ?Sized + GcObject> Gc<T>
[src]
pub fn get(&self) -> &T
[src]
Get reference to data
pub fn get_mut(&self) -> &mut T
[src]
Get mutable reference to data. WARNING: Should be used carefully since Rust does not allows two mutable pointers to same data.
pub fn ref_eq(&self, other: Gc<dyn GcObject>) -> bool
[src]
Compares two pointers
Trait Implementations
impl<T: GcObject + 'static> GcObject for Gc<T>
[src]
fn references(&self) -> Vec<Gc<dyn GcObject>>
[src]
impl<T: ?Sized + GcObject> Send for Gc<T>
[src]
impl<T: Eq + PartialEq + GcObject> Eq for Gc<T>
[src]
impl<T: ?Sized + GcObject + Sync> Sync for Gc<T>
[src]
impl<T: ?Sized + GcObject> Clone for Gc<T>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: PartialOrd + GcObject> PartialOrd<Gc<T>> for Gc<T>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: PartialEq + GcObject> PartialEq<Gc<T>> for Gc<T>
[src]
impl<T: PartialOrd + Ord + GcObject> Ord for Gc<T>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: GcObject + 'static> From<Rooted<T>> for Gc<T>
[src]
impl<T: ?Sized + GcObject> Copy for Gc<T>
[src]
impl<T: GcObject + ?Sized + Unsize<U>, U: GcObject + ?Sized> CoerceUnsized<Gc<U>> for Gc<T>
[src]
impl<T: Hash + GcObject> Hash for Gc<T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: GcObject + ?Sized> Deref for Gc<T>
[src]
impl<T: Debug + GcObject> Debug for Gc<T>
[src]
impl<T: Display + GcObject> Display for Gc<T>
[src]
Auto Trait Implementations
impl<T: ?Sized> Unpin for Gc<T>
impl<T: ?Sized> UnwindSafe for Gc<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T: ?Sized> RefUnwindSafe for Gc<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,