diff --git a/main/help.html b/main/help.html index d9126f2..a435e24 100644 --- a/main/help.html +++ b/main/help.html @@ -1,2 +1,2 @@ -Help +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/main/refuse/all.html b/main/refuse/all.html index 91c43bb..907c255 100644 --- a/main/refuse/all.html +++ b/main/refuse/all.html @@ -1,2 +1,2 @@ -List of all items in this crate +List of all items in this crate

List of all items

Structs

Traits

Derive Macros

Functions

\ No newline at end of file diff --git a/main/refuse/architecture/index.html b/main/refuse/architecture/index.html index 16187a4..71f5915 100644 --- a/main/refuse/architecture/index.html +++ b/main/refuse/architecture/index.html @@ -1,4 +1,4 @@ -refuse::architecture - Rust +refuse::architecture - Rust

Module refuse::architecture

source ·
Expand description

Architecture overview of the underlying design of Refuse.

§Overview

Refuse is an incremental, tracing garbage collector. Incremental garbage diff --git a/main/refuse/derive.MapAs.html b/main/refuse/derive.MapAs.html index ddd4a7b..3ad311a 100644 --- a/main/refuse/derive.MapAs.html +++ b/main/refuse/derive.MapAs.html @@ -1,4 +1,4 @@ -MapAs in refuse - Rust

+MapAs in refuse - Rust

Derive Macro refuse::MapAs

#[derive(MapAs)]
 {
     // Attributes available to this derive:
diff --git a/main/refuse/derive.Trace.html b/main/refuse/derive.Trace.html
index 007c1b4..e2464ad 100644
--- a/main/refuse/derive.Trace.html
+++ b/main/refuse/derive.Trace.html
@@ -1,2 +1,2 @@
-Trace in refuse - Rust
+Trace in refuse - Rust
     

Derive Macro refuse::Trace

#[derive(Trace)]
\ No newline at end of file diff --git a/main/refuse/fn.collect.html b/main/refuse/fn.collect.html index b14e56b..e68b912 100644 --- a/main/refuse/fn.collect.html +++ b/main/refuse/fn.collect.html @@ -1,5 +1,5 @@ -collect in refuse - Rust -

Function refuse::collect

source ·
pub fn collect()
Expand description

Invokes the garbage collector.

+collect in refuse - Rust +

Function refuse::collect

source ·
pub fn collect()
Expand description

Invokes the garbage collector.

§Panics

This function will panic if any CollectionGuards are held and not yielding by the current thread when invoked. If a guard is held, consider diff --git a/main/refuse/fn.try_collect.html b/main/refuse/fn.try_collect.html index 9eb000f..6d91e6f 100644 --- a/main/refuse/fn.try_collect.html +++ b/main/refuse/fn.try_collect.html @@ -1,5 +1,5 @@ -try_collect in refuse - Rust

-

Function refuse::try_collect

source ·
pub fn try_collect() -> Result<(), WouldDeadlock>
Expand description

Invokes the garbage collector.

+try_collect in refuse - Rust +

Function refuse::try_collect

source ·
pub fn try_collect() -> Result<(), WouldDeadlock>
Expand description

Invokes the garbage collector.

§Errors

If any CollectionGuards are held by this thread when this function is invoked, WouldDeadlock is returned.

diff --git a/main/refuse/index.html b/main/refuse/index.html index a4486af..524e624 100644 --- a/main/refuse/index.html +++ b/main/refuse/index.html @@ -1,6 +1,6 @@ -refuse - Rust
source§

impl Trace for AnyRef

source§

const MAY_CONTAIN_REFERENCES: bool = true

If true, this type may contain references and should have its trace() +function invoked during the collector’s “mark” phase.
source§

fn trace(&self, tracer: &mut Tracer<'_>)

Traces all refrences that this value references. Read more
source§

impl Copy for AnyRef

source§

impl Eq for AnyRef

source§

impl StructuralPartialEq for AnyRef

Auto Trait Implementations§

§

impl Freeze for AnyRef

§

impl RefUnwindSafe for AnyRef

§

impl Send for AnyRef

§

impl Sync for AnyRef

§

impl Unpin for AnyRef

§

impl UnwindSafe for AnyRef

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
§

impl<A> Cast for A

§

fn cast<To>(self) -> To
where diff --git a/main/refuse/struct.AnyRoot.html b/main/refuse/struct.AnyRoot.html index 6ef6be4..9d484fe 100644 --- a/main/refuse/struct.AnyRoot.html +++ b/main/refuse/struct.AnyRoot.html @@ -1,20 +1,20 @@ -AnyRoot in refuse - Rust -

Struct refuse::AnyRoot

source ·
pub struct AnyRoot { /* private fields */ }
Expand description

A type-erased root garbage collected reference.

-

Implementations§

source§

impl AnyRoot

source

pub fn load<T>(&self) -> Option<&T>
where +AnyRoot in refuse - Rust +

Struct refuse::AnyRoot

source ·
pub struct AnyRoot { /* private fields */ }
Expand description

A type-erased root garbage collected reference.

+

Implementations§

source§

impl AnyRoot

source

pub fn load<T>(&self) -> Option<&T>
where T: Collectable,

Loads a reference to the underlying data. Returns None if T is not the type of the underlying data.

-
source

pub const fn as_any(&self) -> AnyRef

Returns an untyped “weak” reference to this root.

-

Trait Implementations§

source§

impl Clone for AnyRoot

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Drop for AnyRoot

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T> From<Root<T>> for AnyRoot
where - T: Collectable,

source§

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

Converts to this type from the input type.
source§

impl Hash for AnyRoot

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +

source

pub const fn as_any(&self) -> AnyRef

Returns an untyped “weak” reference to this root.

+

Trait Implementations§

source§

impl Clone for AnyRoot

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Drop for AnyRoot

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T> From<Root<T>> for AnyRoot
where + T: Collectable,

source§

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

Converts to this type from the input type.
source§

impl Hash for AnyRoot

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for AnyRoot

source§

fn cmp(&self, other: &AnyRoot) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for AnyRoot

source§

fn cmp(&self, other: &AnyRoot) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for AnyRoot

source§

fn eq(&self, other: &AnyRoot) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for AnyRoot

source§

fn eq(&self, other: &AnyRoot) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for AnyRoot

source§

fn partial_cmp(&self, other: &AnyRoot) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for AnyRoot

source§

fn partial_cmp(&self, other: &AnyRoot) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Eq for AnyRoot

source§

impl Send for AnyRoot

source§

impl StructuralPartialEq for AnyRoot

source§

impl Sync for AnyRoot

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +operator. Read more

source§

impl Eq for AnyRoot

source§

impl Send for AnyRoot

source§

impl StructuralPartialEq for AnyRoot

source§

impl Sync for AnyRoot

Auto Trait Implementations§

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
§

impl<A> Cast for A

§

fn cast<To>(self) -> To
where diff --git a/main/refuse/struct.CollectionGuard.html b/main/refuse/struct.CollectionGuard.html index 8266091..3cc5a09 100644 --- a/main/refuse/struct.CollectionGuard.html +++ b/main/refuse/struct.CollectionGuard.html @@ -1,5 +1,5 @@ -CollectionGuard in refuse - Rust -

Struct refuse::CollectionGuard

source ·
pub struct CollectionGuard<'a> { /* private fields */ }
Expand description

A guard that prevents garbage collection while held.

+CollectionGuard in refuse - Rust +

Struct refuse::CollectionGuard

source ·
pub struct CollectionGuard<'a> { /* private fields */ }
Expand description

A guard that prevents garbage collection while held.

To perform garbage collection, all threads must be paused to be traced. A CollectionGuard allows the ability to read garbage-collectable data by ensuring the garbage collector can’t run while it exists.

@@ -15,24 +15,30 @@ IO, reading from a channel, or any other operation that may pause the current thread. CollectionGuard::while_unlocked() can be used to temporarily release a guard during a long operation.

-

Implementations§

source§

impl CollectionGuard<'static>

source

pub fn acquire() -> Self

Acquires a lock that prevents the garbage collector from running.

+

Implementations§

source§

impl CollectionGuard<'static>

source

pub fn acquire() -> Self

Acquires a lock that prevents the garbage collector from running.

This guard is used to provide read-only access to garbage collected allocations.

§Panics

A panic will occur if this function is called outside of code executed by [collected()].

-
source§

impl CollectionGuard<'_>

source

pub fn allocating_in<'a>(&self, pool: &'a LocalPool) -> CollectionGuard<'a>

Returns a guard that allocates from pool.

-
source

pub fn collect(&mut self)

Manually invokes the garbage collector.

+
source

pub fn try_acquire() -> Option<Self>

Acquires a lock that prevents the garbage collector from running.

+

This guard is used to provide read-only access to garbage collected +allocations.

+
§Panics
+

A panic will occur if this function is called outside of code executed +by [collected()].

+
source§

impl CollectionGuard<'_>

source

pub fn allocating_in<'a>(&self, pool: &'a LocalPool) -> CollectionGuard<'a>

Returns a guard that allocates from pool.

+
source

pub fn collect(&mut self)

Manually invokes the garbage collector.

This method temporarily releases this guard’s lock and waits for a garbage collection to run. If a garbage collection is already in progress, this function will return when the in-progress collection completes. Otherwise, the collector is started and this function waits until the collection finishes.

Finally, the guard is reacquired before returning.

-
§Panics
+
§Panics

This function will panic if any other CollectionGuards are held by the current thread when invoked.

-
source

pub fn try_collect(&mut self) -> Result<(), WouldDeadlock>

Manually invokes the garbage collector.

+
source

pub fn try_collect(&mut self) -> Result<(), WouldDeadlock>

Manually invokes the garbage collector.

This method temporarily releases this guard’s lock and waits for a garbage collection to run. If a garbage collection is already in progress, this function will return when the in-progress collection @@ -42,14 +48,14 @@

§Panics
§Errors

If another CollectionGuard is held by the current thread, WouldDeadlock will be returned and unlocked will not be invoked.

-
source

pub fn yield_to_collector(&mut self)

Yield to the garbage collector, if needed.

+
source

pub fn yield_to_collector(&mut self)

Yield to the garbage collector, if needed.

This function will not yield unless the garbage collector is trying to acquire this thread’s lock. Because of this, it is a fairly efficient function to invoke. To minimize collection pauses, long-held guards should call this function regularly.

If any other guards are currently held by this thread, this function does nothing.

-
source

pub fn coordinated_yield( +

source

pub fn coordinated_yield( &mut self, yielder: impl FnOnce(Yielder<'_>) -> YieldComplete )

Perform a coordinated yield to the collector, if needed.

@@ -69,18 +75,18 @@
§Errors
should call this function regularly.

If any other guards are currently held by this thread, this function does nothing.

-
source

pub fn while_unlocked<R>(&mut self, unlocked: impl FnOnce() -> R) -> R

Executes unlocked while this guard is temporarily released.

-
§Panics
+
source

pub fn while_unlocked<R>(&mut self, unlocked: impl FnOnce() -> R) -> R

Executes unlocked while this guard is temporarily released.

+
§Panics

This function will panic if any other CollectionGuards are held by the current thread when invoked.

-
source

pub fn try_while_unlocked<R>( +

source

pub fn try_while_unlocked<R>( &mut self, unlocked: impl FnOnce() -> R ) -> Result<R, WouldDeadlock>

Executes unlocked while this guard is temporarily released.

§Errors

If another CollectionGuard is held by the current thread, WouldDeadlock will be returned and unlocked will not be invoked.

-

Trait Implementations§

source§

impl<'a> AsMut<CollectionGuard<'a>> for CollectionGuard<'a>

source§

fn as_mut(&mut self) -> &mut CollectionGuard<'a>

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<'a> AsRef<CollectionGuard<'a>> for CollectionGuard<'a>

source§

fn as_ref(&self) -> &CollectionGuard<'a>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Drop for CollectionGuard<'_>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for CollectionGuard<'a>

§

impl<'a> !RefUnwindSafe for CollectionGuard<'a>

§

impl<'a> !Send for CollectionGuard<'a>

§

impl<'a> !Sync for CollectionGuard<'a>

§

impl<'a> Unpin for CollectionGuard<'a>

§

impl<'a> !UnwindSafe for CollectionGuard<'a>

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl<'a> AsMut<CollectionGuard<'a>> for CollectionGuard<'a>

source§

fn as_mut(&mut self) -> &mut CollectionGuard<'a>

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<'a> AsRef<CollectionGuard<'a>> for CollectionGuard<'a>

source§

fn as_ref(&self) -> &CollectionGuard<'a>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Drop for CollectionGuard<'_>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for CollectionGuard<'a>

§

impl<'a> !RefUnwindSafe for CollectionGuard<'a>

§

impl<'a> !Send for CollectionGuard<'a>

§

impl<'a> !Sync for CollectionGuard<'a>

§

impl<'a> Unpin for CollectionGuard<'a>

§

impl<'a> !UnwindSafe for CollectionGuard<'a>

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
§

impl<A> Cast for A

§

fn cast<To>(self) -> To
where diff --git a/main/refuse/struct.LocalPool.html b/main/refuse/struct.LocalPool.html index 4aeaf14..c5a7b9b 100644 --- a/main/refuse/struct.LocalPool.html +++ b/main/refuse/struct.LocalPool.html @@ -1,5 +1,5 @@ -LocalPool in refuse - Rust -

Struct refuse::LocalPool

source ·
pub struct LocalPool { /* private fields */ }
Expand description

A pool of garbage collected values.

+LocalPool in refuse - Rust +

Struct refuse::LocalPool

source ·
pub struct LocalPool { /* private fields */ }
Expand description

A pool of garbage collected values.

Values from any pool can be read using any CollectionGuard. Using independent pools for specific types of data that are meant to be shared across many threads might be beneficial. However, an individual local pool @@ -7,8 +7,8 @@ collected. Because of this, it may make sense to store some types in their own pool, ensuring their collection is independent of how the values are used amongst other threads.

-

Implementations§

source§

impl LocalPool

source

pub fn enter(&self) -> CollectionGuard<'_>

Acquires a collection guard for this pool.

-

Trait Implementations§

source§

impl Default for LocalPool

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Drop for LocalPool

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Implementations§

source§

impl LocalPool

source

pub fn enter(&self) -> CollectionGuard<'_>

Acquires a collection guard for this pool.

+

Trait Implementations§

source§

impl Default for LocalPool

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Drop for LocalPool

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

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
§

impl<A> Cast for A

§

fn cast<To>(self) -> To
where diff --git a/main/refuse/struct.Ref.html b/main/refuse/struct.Ref.html index b38072a..55a814a 100644 --- a/main/refuse/struct.Ref.html +++ b/main/refuse/struct.Ref.html @@ -1,5 +1,5 @@ -Ref in refuse - Rust -

Struct refuse::Ref

source ·
pub struct Ref<T> { /* private fields */ }
Expand description

A reference to data stored in a garbage collector.

+Ref in refuse - Rust +

Struct refuse::Ref

source ·
pub struct Ref<T> { /* private fields */ }
Expand description

A reference to data stored in a garbage collector.

Unlike a Root<T>, this type is not guaranteed to have access to its underlying data. If no Collectable reachable via all active Roots marks this allocation, it will be collected.

@@ -37,52 +37,52 @@

// error[E0502]: cannot borrow `guard` as mutable because it is also borrowed as immutable assert_eq!(reference, &42);

-

Implementations§

source§

impl<T> Ref<T>
where - T: Collectable,

source

pub fn new<'a>(value: T, guard: impl AsRef<CollectionGuard<'a>>) -> Self

Stores value in the garbage collector, returning a “weak” reference to +

Implementations§

source§

impl<T> Ref<T>
where + T: Collectable,

source

pub fn new<'a>(value: T, guard: impl AsRef<CollectionGuard<'a>>) -> Self

Stores value in the garbage collector, returning a “weak” reference to it.

-
source

pub const fn as_any(self) -> AnyRef

Returns this reference as an untyped reference.

-
source

pub fn load<'guard>( +

source

pub const fn as_any(self) -> AnyRef

Returns this reference as an untyped reference.

+
source

pub fn load<'guard>( &self, guard: &'guard CollectionGuard<'_> ) -> Option<&'guard T>

Loads a reference to the underlying data. Returns None if the data has been collected and is no longer available.

-
source

pub fn as_root(&self, guard: &CollectionGuard<'_>) -> Option<Root<T>>

Loads a root reference to the underlying data. Returns None if the +

source

pub fn as_root(&self, guard: &CollectionGuard<'_>) -> Option<Root<T>>

Loads a root reference to the underlying data. Returns None if the data has been collected and is no longer available.

-

Trait Implementations§

source§

impl<T> AsRef<Ref<T>> for Ref<T>

source§

fn as_ref(&self) -> &Ref<T>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> AsRef<Ref<T>> for Root<T>
where - T: Collectable,

source§

fn as_ref(&self) -> &Ref<T>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> Clone for Ref<T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Ref<T>
where - T: Collectable + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> From<&Ref<T>> for AnyRef
where - T: Collectable,

source§

fn from(value: &Ref<T>) -> Self

Converts to this type from the input type.
source§

impl<T> From<Ref<T>> for AnyRef
where - T: Collectable,

source§

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

Converts to this type from the input type.
source§

impl<T> Hash for Ref<T>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +

Trait Implementations§

source§

impl<T> AsRef<Ref<T>> for Ref<T>

source§

fn as_ref(&self) -> &Ref<T>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> AsRef<Ref<T>> for Root<T>
where + T: Collectable,

source§

fn as_ref(&self) -> &Ref<T>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> Clone for Ref<T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Ref<T>
where + T: Collectable + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> From<&Ref<T>> for AnyRef
where + T: Collectable,

source§

fn from(value: &Ref<T>) -> Self

Converts to this type from the input type.
source§

impl<T> From<Ref<T>> for AnyRef
where + T: Collectable,

source§

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

Converts to this type from the input type.
source§

impl<T> Hash for Ref<T>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T> Ord for Ref<T>

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T> Ord for Ref<T>

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<T> PartialEq<&AnyRef> for Ref<T>
where - T: Collectable,

source§

fn eq(&self, other: &&AnyRef) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<&Ref<T>> for Root<T>
where - T: Collectable,

source§

fn eq(&self, other: &&Ref<T>) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
source§

impl<T> PartialEq<&AnyRef> for Ref<T>
where + T: Collectable,

source§

fn eq(&self, other: &&AnyRef) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<&Root<T>> for Ref<T>
where - T: Collectable,

source§

fn eq(&self, other: &&Root<T>) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<AnyRef> for Ref<T>
where - T: Collectable,

source§

fn eq(&self, other: &AnyRef) -> bool

This method tests for self and other values to be equal, and is used +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<&Ref<T>> for Root<T>
where + T: Collectable,

source§

fn eq(&self, other: &&Ref<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<Ref<T>> for Root<T>
where - T: Collectable,

source§

fn eq(&self, other: &Ref<T>) -> bool

This method tests for self and other values to be equal, and is used +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<&Root<T>> for Ref<T>
where + T: Collectable,

source§

fn eq(&self, other: &&Root<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<AnyRef> for Ref<T>
where + T: Collectable,

source§

fn eq(&self, other: &AnyRef) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<Ref<T>> for Root<T>
where + T: Collectable,

source§

fn eq(&self, other: &Ref<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<Root<T>> for Ref<T>
where - T: Collectable,

source§

fn eq(&self, other: &Root<T>) -> bool

This method tests for self and other values to be equal, and is used +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<Root<T>> for Ref<T>
where + T: Collectable,

source§

fn eq(&self, other: &Root<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq for Ref<T>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialOrd for Ref<T>

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq for Ref<T>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialOrd for Ref<T>

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl<T> Trace for Ref<T>
where - T: Collectable,

source§

const MAY_CONTAIN_REFERENCES: bool = true

If true, this type may contain references and should have its trace() -function invoked during the collector’s “mark” phase.
source§

fn trace(&self, tracer: &mut Tracer<'_>)

Traces all refrences that this value references. Read more
source§

impl<T> Copy for Ref<T>

source§

impl<T> Eq for Ref<T>

source§

impl<T> Send for Ref<T>
where - T: Send,

source§

impl<T> Sync for Ref<T>
where +operator. Read more
source§

impl<T> Trace for Ref<T>
where + T: Collectable,

source§

const MAY_CONTAIN_REFERENCES: bool = true

If true, this type may contain references and should have its trace() +function invoked during the collector’s “mark” phase.
source§

fn trace(&self, tracer: &mut Tracer<'_>)

Traces all refrences that this value references. Read more
source§

impl<T> Copy for Ref<T>

source§

impl<T> Eq for Ref<T>

source§

impl<T> Send for Ref<T>
where + T: Send,

source§

impl<T> Sync for Ref<T>
where T: Sync,

Auto Trait Implementations§

§

impl<T> Freeze for Ref<T>

§

impl<T> RefUnwindSafe for Ref<T>

§

impl<T> Unpin for Ref<T>

§

impl<T> UnwindSafe for Ref<T>

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 diff --git a/main/refuse/struct.Root.html b/main/refuse/struct.Root.html index e561243..c9be889 100644 --- a/main/refuse/struct.Root.html +++ b/main/refuse/struct.Root.html @@ -1,64 +1,64 @@ -Root in refuse - Rust -

Struct refuse::Root

source ·
pub struct Root<T>
where +Root in refuse - Rust +

Struct refuse::Root

source ·
pub struct Root<T>
where T: Collectable,
{ /* private fields */ }
Expand description

A root reference to a T that has been allocated in the garbage collector.

This type behaves very similarly to Arc<T>. It implements Deref<Target = T>, and it is also cheap-to-clone, utilizing atomic reference counting to track the number of root references currently exist to the underlying value.

While any root references exist for a given allocation, the garbage collector will not collect the allocation.

-

Implementations§

source§

impl<T> Root<T>
where - T: Collectable,

source

pub fn new<'a>(value: T, guard: impl AsRef<CollectionGuard<'a>>) -> Self

Stores value in the garbage collector, returning a root reference to +

Implementations§

source§

impl<T> Root<T>
where + T: Collectable,

source

pub fn new<'a>(value: T, guard: impl AsRef<CollectionGuard<'a>>) -> Self

Stores value in the garbage collector, returning a root reference to the data.

-
source

pub fn root_count(&self) -> u64

Returns the current number of root references to this value, including +

source

pub fn root_count(&self) -> u64

Returns the current number of root references to this value, including self.

-
source

pub const fn downgrade(&self) -> Ref<T>

Returns a “weak” reference to this root.

-
source

pub const fn downgrade_any(&self) -> AnyRef

Returns an untyped “weak” reference erased to this root.

-
source

pub fn to_any_root(&self) -> AnyRoot

Returns an untyped root reference.

-
source

pub fn into_any_root(self) -> AnyRoot

Returns this root as an untyped root.

-
source

pub fn ptr_eq(this: &Self, other: &Self) -> bool

Returns true if these two references point to the same underlying +

source

pub const fn downgrade(&self) -> Ref<T>

Returns a “weak” reference to this root.

+
source

pub const fn downgrade_any(&self) -> AnyRef

Returns an untyped “weak” reference erased to this root.

+
source

pub fn to_any_root(&self) -> AnyRoot

Returns an untyped root reference.

+
source

pub fn into_any_root(self) -> AnyRoot

Returns this root as an untyped root.

+
source

pub fn ptr_eq(this: &Self, other: &Self) -> bool

Returns true if these two references point to the same underlying allocation.

-

Trait Implementations§

source§

impl<T> AsRef<Ref<T>> for Root<T>
where - T: Collectable,

source§

fn as_ref(&self) -> &Ref<T>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> Clone for Root<T>
where - T: Collectable,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Root<T>
where - T: Collectable + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Deref for Root<T>
where - T: Collectable,

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<T> Drop for Root<T>
where - T: Collectable,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T> From<&Root<T>> for AnyRef
where - T: Collectable,

source§

fn from(value: &Root<T>) -> Self

Converts to this type from the input type.
source§

impl<T> From<Root<T>> for AnyRoot
where - T: Collectable,

source§

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

Converts to this type from the input type.
source§

impl<T> Hash for Root<T>
where - T: Collectable + Hash,

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +

Trait Implementations§

source§

impl<T> AsRef<Ref<T>> for Root<T>
where + T: Collectable,

source§

fn as_ref(&self) -> &Ref<T>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> Clone for Root<T>
where + T: Collectable,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Root<T>
where + T: Collectable + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Deref for Root<T>
where + T: Collectable,

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<T> Drop for Root<T>
where + T: Collectable,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T> From<&Root<T>> for AnyRef
where + T: Collectable,

source§

fn from(value: &Root<T>) -> Self

Converts to this type from the input type.
source§

impl<T> From<Root<T>> for AnyRoot
where + T: Collectable,

source§

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

Converts to this type from the input type.
source§

impl<T> Hash for Root<T>
where + T: Collectable + Hash,

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T> Ord for Root<T>
where - T: Collectable + Ord,

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T> Ord for Root<T>
where + T: Collectable + Ord,

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<T> PartialEq<&AnyRef> for Root<T>
where - T: Collectable,

source§

fn eq(&self, other: &&AnyRef) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<&Ref<T>> for Root<T>
where - T: Collectable,

source§

fn eq(&self, other: &&Ref<T>) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<&Root<T>> for Ref<T>
where - T: Collectable,

source§

fn eq(&self, other: &&Root<T>) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<AnyRef> for Root<T>
where - T: Collectable,

source§

fn eq(&self, other: &AnyRef) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<T> PartialEq<&AnyRef> for Root<T>
where + T: Collectable,

source§

fn eq(&self, other: &&AnyRef) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<Ref<T>> for Root<T>
where - T: Collectable,

source§

fn eq(&self, other: &Ref<T>) -> bool

This method tests for self and other values to be equal, and is used +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<&Ref<T>> for Root<T>
where + T: Collectable,

source§

fn eq(&self, other: &&Ref<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<&Root<T>> for Ref<T>
where + T: Collectable,

source§

fn eq(&self, other: &&Root<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<AnyRef> for Root<T>
where + T: Collectable,

source§

fn eq(&self, other: &AnyRef) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<Ref<T>> for Root<T>
where + T: Collectable,

source§

fn eq(&self, other: &Ref<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<Root<T>> for Ref<T>
where - T: Collectable,

source§

fn eq(&self, other: &Root<T>) -> bool

This method tests for self and other values to be equal, and is used +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq<Root<T>> for Ref<T>
where + T: Collectable,

source§

fn eq(&self, other: &Root<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq for Root<T>
where - T: Collectable + PartialEq,

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialOrd for Root<T>
where - T: Collectable + PartialOrd,

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialEq for Root<T>
where + T: Collectable + PartialEq,

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialOrd for Root<T>
where + T: Collectable + PartialOrd,

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl<T> Trace for Root<T>
where - T: Collectable,

source§

const MAY_CONTAIN_REFERENCES: bool = false

If true, this type may contain references and should have its trace() -function invoked during the collector’s “mark” phase.
source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Traces all refrences that this value references. Read more
source§

impl<T> Eq for Root<T>
where - T: Collectable + Eq,

source§

impl<T> Send for Root<T>
where - T: Collectable,

source§

impl<T> Sync for Root<T>
where +operator. Read more
source§

impl<T> Trace for Root<T>
where + T: Collectable,

source§

const MAY_CONTAIN_REFERENCES: bool = false

If true, this type may contain references and should have its trace() +function invoked during the collector’s “mark” phase.
source§

fn trace(&self, _tracer: &mut Tracer<'_>)

Traces all refrences that this value references. Read more
source§

impl<T> Eq for Root<T>
where + T: Collectable + Eq,

source§

impl<T> Send for Root<T>
where + T: Collectable,

source§

impl<T> Sync for Root<T>
where T: Collectable,

Auto Trait Implementations§

§

impl<T> Freeze for Root<T>

§

impl<T> RefUnwindSafe for Root<T>
where T: RefUnwindSafe,

§

impl<T> Unpin for Root<T>

§

impl<T> UnwindSafe for Root<T>
where T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/main/refuse/struct.Tracer.html b/main/refuse/struct.Tracer.html index 92dfac2..136bc06 100644 --- a/main/refuse/struct.Tracer.html +++ b/main/refuse/struct.Tracer.html @@ -1,8 +1,8 @@ -Tracer in refuse - Rust -

Struct refuse::Tracer

source ·
pub struct Tracer<'a> { /* private fields */ }
Expand description

A tracer for the garbage collector.

+Tracer in refuse - Rust +

Struct refuse::Tracer

source ·
pub struct Tracer<'a> { /* private fields */ }
Expand description

A tracer for the garbage collector.

This type allows Collectable values to mark() any Ref<T>s they contain.

-

Implementations§

source§

impl<'a> Tracer<'a>

source

pub fn mark(&mut self, collectable: impl Into<AnyRef>)

Marks collectable as being referenced, ensuring it is not garbage +

Implementations§

source§

impl<'a> Tracer<'a>

source

pub fn mark(&mut self, collectable: impl Into<AnyRef>)

Marks collectable as being referenced, ensuring it is not garbage collected.

Auto Trait Implementations§

§

impl<'a> Freeze for Tracer<'a>

§

impl<'a> RefUnwindSafe for Tracer<'a>

§

impl<'a> Send for Tracer<'a>

§

impl<'a> Sync for Tracer<'a>

§

impl<'a> Unpin for Tracer<'a>

§

impl<'a> UnwindSafe for Tracer<'a>

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 diff --git a/main/refuse/struct.WouldDeadlock.html b/main/refuse/struct.WouldDeadlock.html index ee2d4ab..321029a 100644 --- a/main/refuse/struct.WouldDeadlock.html +++ b/main/refuse/struct.WouldDeadlock.html @@ -1,5 +1,5 @@ -WouldDeadlock in refuse - Rust -

Struct refuse::WouldDeadlock

source ·
pub struct WouldDeadlock;
Expand description

An error indicating an operation would deadlock.

+WouldDeadlock in refuse - Rust +

Struct refuse::WouldDeadlock

source ·
pub struct WouldDeadlock;
Expand description

An error indicating an operation would deadlock.

CollectionGuard::acquire can be called multiple times from the same thread, but some operations require that all guards for the current thread have been released before performing. This error signals when an operation @@ -16,9 +16,9 @@ drop(guard2); assert_eq!(guard1.try_collect(), Ok(()));

-

Trait Implementations§

source§

impl Clone for WouldDeadlock

source§

fn clone(&self) -> WouldDeadlock

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WouldDeadlock

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for WouldDeadlock

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for WouldDeadlock

source§

fn eq(&self, other: &WouldDeadlock) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl Clone for WouldDeadlock

source§

fn clone(&self) -> WouldDeadlock

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WouldDeadlock

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for WouldDeadlock

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for WouldDeadlock

source§

fn eq(&self, other: &WouldDeadlock) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for WouldDeadlock

source§

impl Eq for WouldDeadlock

source§

impl StructuralPartialEq for WouldDeadlock

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +sufficient, and should not be overridden without very good reason.

source§

impl Copy for WouldDeadlock

source§

impl Eq for WouldDeadlock

source§

impl StructuralPartialEq for WouldDeadlock

Auto Trait Implementations§

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
§

impl<A> Cast for A

§

fn cast<To>(self) -> To
where @@ -29,7 +29,7 @@

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

source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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>,

§

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.
\ No newline at end of file diff --git a/main/refuse/struct.YieldComplete.html b/main/refuse/struct.YieldComplete.html index 3348442..d02b9b8 100644 --- a/main/refuse/struct.YieldComplete.html +++ b/main/refuse/struct.YieldComplete.html @@ -1,5 +1,5 @@ -YieldComplete in refuse - Rust -

Struct refuse::YieldComplete

source ·
pub struct YieldComplete;
Expand description

A marker indicating that a coordinated +YieldComplete in refuse - Rust

+

Struct refuse::YieldComplete

source ·
pub struct YieldComplete;
Expand description

A marker indicating that a coordinated yield has completed.

Auto Trait Implementations§

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 diff --git a/main/refuse/struct.Yielder.html b/main/refuse/struct.Yielder.html index fd02e50..f6c6f82 100644 --- a/main/refuse/struct.Yielder.html +++ b/main/refuse/struct.Yielder.html @@ -1,6 +1,6 @@ -Yielder in refuse - Rust -

Struct refuse::Yielder

source ·
pub struct Yielder<'a>(/* private fields */);
Expand description

A pending yield to the garbage collector.

-

Implementations§

source§

impl Yielder<'_>

source

pub fn wait(self) -> YieldComplete

Waits for the garbage collector to finish the current collection.

+Yielder in refuse - Rust +

Struct refuse::Yielder

source ·
pub struct Yielder<'a>(/* private fields */);
Expand description

A pending yield to the garbage collector.

+

Implementations§

source§

impl Yielder<'_>

source

pub fn wait(self) -> YieldComplete

Waits for the garbage collector to finish the current collection.

Auto Trait Implementations§

§

impl<'a> Freeze for Yielder<'a>

§

impl<'a> !RefUnwindSafe for Yielder<'a>

§

impl<'a> Send for Yielder<'a>

§

impl<'a> Sync for Yielder<'a>

§

impl<'a> Unpin for Yielder<'a>

§

impl<'a> !UnwindSafe for Yielder<'a>

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 diff --git a/main/refuse/trait.Collectable.html b/main/refuse/trait.Collectable.html index b38617f..4c4bae1 100644 --- a/main/refuse/trait.Collectable.html +++ b/main/refuse/trait.Collectable.html @@ -1,5 +1,5 @@ -Collectable in refuse - Rust -

Trait refuse::Collectable

source ·
pub trait Collectable: Trace + MapAs + Send + Sync + 'static { }
Expand description

A type that can be garbage collected.

+Collectable in refuse - Rust +

Trait refuse::Collectable

source ·
pub trait Collectable: Trace + MapAs + Send + Sync + 'static { }
Expand description

A type that can be garbage collected.

A type needs to implement both Trace and MapAs to be collectable.

If a type can’t contain any Ref<T>s and no mapping functionality is desired, the SimpleType trait can be implemented instead of Trace @@ -8,5 +8,5 @@ implemented instead of Trace.

If no mapping functionality is desired, NoMapping can be implemented instead of MapAs.

-

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Collectable for T
where +

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Collectable for T
where T: Trace + MapAs + Send + Sync + 'static,

\ No newline at end of file diff --git a/main/refuse/trait.ContainsNoRefs.html b/main/refuse/trait.ContainsNoRefs.html index cd5456d..65af66b 100644 --- a/main/refuse/trait.ContainsNoRefs.html +++ b/main/refuse/trait.ContainsNoRefs.html @@ -1,7 +1,7 @@ -ContainsNoRefs in refuse - Rust -
pub trait ContainsNoRefs: Send + Sync + 'static { }
Expand description

A type that can be garbage collected that cannot contain any Ref<T>s.

+ContainsNoRefs in refuse - Rust +
pub trait ContainsNoRefs: Send + Sync + 'static { }
Expand description

A type that can be garbage collected that cannot contain any Ref<T>s.

Types that implement this trait automatically implement Collectable. This trait reduces the boilerplate for implementing Collectable for self-contained types.

-

Implementors§

source§

impl<T> ContainsNoRefs for T
where +

Implementors§

source§

impl<T> ContainsNoRefs for T
where T: SimpleType,

\ No newline at end of file diff --git a/main/refuse/trait.MapAs.html b/main/refuse/trait.MapAs.html index c555dbb..16de226 100644 --- a/main/refuse/trait.MapAs.html +++ b/main/refuse/trait.MapAs.html @@ -1,5 +1,5 @@ -MapAs in refuse - Rust -

Trait refuse::MapAs

source ·
pub trait MapAs: Send + Sync + 'static {
+MapAs in refuse - Rust
+    

Trait refuse::MapAs

source ·
pub trait MapAs: Send + Sync + 'static {
     type Target: ?Sized + 'static;
 
     // Required method
@@ -8,7 +8,7 @@
 

This trait is used by AnyRef::load_mapped() to enable type-erased loading of a secondary type.

If no mapping is desired, implement NoMapping instead.

-

Required Associated Types§

source

type Target: ?Sized + 'static

The target type of the mapping.

-

Required Methods§

source

fn map_as(&self) -> &Self::Target

Maps self to target type.

-

Implementors§

source§

impl<T> MapAs for T
where +

Required Associated Types§

source

type Target: ?Sized + 'static

The target type of the mapping.

+

Required Methods§

source

fn map_as(&self) -> &Self::Target

Maps self to target type.

+

Implementors§

source§

impl<T> MapAs for T
where T: NoMapping,

§

type Target = ()

\ No newline at end of file diff --git a/main/refuse/trait.NoMapping.html b/main/refuse/trait.NoMapping.html index f219c25..6aeee1f 100644 --- a/main/refuse/trait.NoMapping.html +++ b/main/refuse/trait.NoMapping.html @@ -1,20 +1,20 @@ -NoMapping in refuse - Rust -

Trait refuse::NoMapping

source ·
pub trait NoMapping: Send + Sync + 'static { }
Expand description

A type that implements MapAs with an empty implementation.

-

Implementations on Foreign Types§

source§

impl<K> NoMapping for BTreeSet<K>
where - K: Send + Sync + 'static,

source§

impl<K> NoMapping for Set<K>
where - K: Sort + Send + Sync + 'static,

source§

impl<K, S> NoMapping for HashSet<K, S>
where +NoMapping in refuse - Rust +

Trait refuse::NoMapping

source ·
pub trait NoMapping: Send + Sync + 'static { }
Expand description

A type that implements MapAs with an empty implementation.

+

Implementations on Foreign Types§

source§

impl<K> NoMapping for BTreeSet<K>
where + K: Send + Sync + 'static,

source§

impl<K> NoMapping for Set<K>
where + K: Sort + Send + Sync + 'static,

source§

impl<K, S> NoMapping for HashSet<K, S>
where K: Send + Sync + 'static, - S: Send + Sync + 'static,

source§

impl<K, V> NoMapping for BTreeMap<K, V>
where + S: Send + Sync + 'static,

source§

impl<K, V> NoMapping for BTreeMap<K, V>
where K: Send + Sync + 'static, - V: Send + Sync + 'static,

source§

impl<K, V> NoMapping for Map<K, V>
where + V: Send + Sync + 'static,

source§

impl<K, V> NoMapping for Map<K, V>
where K: Sort + Send + Sync + 'static, - V: Send + Sync + 'static,

source§

impl<K, V, S> NoMapping for HashMap<K, V, S>
where + V: Send + Sync + 'static,

source§

impl<K, V, S> NoMapping for HashMap<K, V, S>
where K: Send + Sync + 'static, V: Send + Sync + 'static, - S: Send + Sync + 'static,

source§

impl<T> NoMapping for BinaryHeap<T>
where - T: Send + Sync + 'static,

source§

impl<T> NoMapping for LinkedList<T>
where - T: Send + Sync + 'static,

source§

impl<T> NoMapping for VecDeque<T>
where - T: Send + Sync + 'static,

source§

impl<T> NoMapping for Vec<T>
where - T: Send + Sync + 'static,

source§

impl<T, const N: usize> NoMapping for [T; N]
where - T: Send + Sync + 'static,

Implementors§

source§

impl<T> NoMapping for T
where + S: Send + Sync + 'static,

source§

impl<T> NoMapping for BinaryHeap<T>
where + T: Send + Sync + 'static,

source§

impl<T> NoMapping for LinkedList<T>
where + T: Send + Sync + 'static,

source§

impl<T> NoMapping for VecDeque<T>
where + T: Send + Sync + 'static,

source§

impl<T> NoMapping for Vec<T>
where + T: Send + Sync + 'static,

source§

impl<T, const N: usize> NoMapping for [T; N]
where + T: Send + Sync + 'static,

Implementors§

source§

impl<T> NoMapping for T
where T: SimpleType,

\ No newline at end of file diff --git a/main/refuse/trait.SimpleType.html b/main/refuse/trait.SimpleType.html index 3530808..b00ab8d 100644 --- a/main/refuse/trait.SimpleType.html +++ b/main/refuse/trait.SimpleType.html @@ -1,6 +1,6 @@ -SimpleType in refuse - Rust -

Trait refuse::SimpleType

source ·
pub trait SimpleType: Send + Sync + 'static { }
Expand description

A type that can contain no Ref<T>s and has an empty MapAs +SimpleType in refuse - Rust

+

Trait refuse::SimpleType

source ·
pub trait SimpleType: Send + Sync + 'static { }
Expand description

A type that can contain no Ref<T>s and has an empty MapAs implementation.

Implementing this trait for a type automatically implements NoMapping and ContainsNoRefs, which makes the type Collectable.

-

Implementations on Foreign Types§

source§

impl SimpleType for i8

source§

impl SimpleType for i16

source§

impl SimpleType for i32

source§

impl SimpleType for i64

source§

impl SimpleType for i128

source§

impl SimpleType for isize

source§

impl SimpleType for u8

source§

impl SimpleType for u16

source§

impl SimpleType for u32

source§

impl SimpleType for u64

source§

impl SimpleType for u128

source§

impl SimpleType for usize

source§

impl SimpleType for String

source§

impl SimpleType for AtomicI8

source§

impl SimpleType for AtomicI16

source§

impl SimpleType for AtomicI32

source§

impl SimpleType for AtomicI64

source§

impl SimpleType for AtomicIsize

source§

impl SimpleType for AtomicU8

source§

impl SimpleType for AtomicU16

source§

impl SimpleType for AtomicU32

source§

impl SimpleType for AtomicU64

source§

impl SimpleType for AtomicUsize

source§

impl SimpleType for NonZeroI8

source§

impl SimpleType for NonZeroI16

source§

impl SimpleType for NonZeroI32

source§

impl SimpleType for NonZeroI64

source§

impl SimpleType for NonZeroI128

source§

impl SimpleType for NonZeroIsize

source§

impl SimpleType for NonZeroU8

source§

impl SimpleType for NonZeroU16

source§

impl SimpleType for NonZeroU32

source§

impl SimpleType for NonZeroU64

source§

impl SimpleType for NonZeroU128

source§

impl SimpleType for NonZeroUsize

Implementors§

\ No newline at end of file +

Implementations on Foreign Types§

source§

impl SimpleType for i8

source§

impl SimpleType for i16

source§

impl SimpleType for i32

source§

impl SimpleType for i64

source§

impl SimpleType for i128

source§

impl SimpleType for isize

source§

impl SimpleType for u8

source§

impl SimpleType for u16

source§

impl SimpleType for u32

source§

impl SimpleType for u64

source§

impl SimpleType for u128

source§

impl SimpleType for usize

source§

impl SimpleType for String

source§

impl SimpleType for AtomicI8

source§

impl SimpleType for AtomicI16

source§

impl SimpleType for AtomicI32

source§

impl SimpleType for AtomicI64

source§

impl SimpleType for AtomicIsize

source§

impl SimpleType for AtomicU8

source§

impl SimpleType for AtomicU16

source§

impl SimpleType for AtomicU32

source§

impl SimpleType for AtomicU64

source§

impl SimpleType for AtomicUsize

source§

impl SimpleType for NonZeroI8

source§

impl SimpleType for NonZeroI16

source§

impl SimpleType for NonZeroI32

source§

impl SimpleType for NonZeroI64

source§

impl SimpleType for NonZeroI128

source§

impl SimpleType for NonZeroIsize

source§

impl SimpleType for NonZeroU8

source§

impl SimpleType for NonZeroU16

source§

impl SimpleType for NonZeroU32

source§

impl SimpleType for NonZeroU64

source§

impl SimpleType for NonZeroU128

source§

impl SimpleType for NonZeroUsize

Implementors§

\ No newline at end of file diff --git a/main/refuse/trait.Trace.html b/main/refuse/trait.Trace.html index 0971d96..ead719a 100644 --- a/main/refuse/trait.Trace.html +++ b/main/refuse/trait.Trace.html @@ -1,34 +1,34 @@ -Trace in refuse - Rust -

Trait refuse::Trace

source ·
pub trait Trace: Send + Sync + 'static {
+Trace in refuse - Rust
+    

Trait refuse::Trace

source ·
pub trait Trace: Send + Sync + 'static {
     const MAY_CONTAIN_REFERENCES: bool;
 
     // Required method
     fn trace(&self, tracer: &mut Tracer<'_>);
 }
Expand description

A type that can find and mark any references it has.

-

Required Associated Constants§

source

const MAY_CONTAIN_REFERENCES: bool

If true, this type may contain references and should have its trace() +

Required Associated Constants§

source

const MAY_CONTAIN_REFERENCES: bool

If true, this type may contain references and should have its trace() function invoked during the collector’s “mark” phase.

-

Required Methods§

source

fn trace(&self, tracer: &mut Tracer<'_>)

Traces all refrences that this value references.

+

Required Methods§

source

fn trace(&self, tracer: &mut Tracer<'_>)

Traces all refrences that this value references.

This function should invoke Tracer::mark() for each Ref<T> it contains. Failing to do so will allow the garbage collector to free the data, preventing the ability to load() the data in the future.

-

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<K> Trace for BTreeSet<K>
where - K: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = K::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<K> Trace for Set<K>
where - K: Trace + Sort,

source§

const MAY_CONTAIN_REFERENCES: bool = K::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<K, S> Trace for HashSet<K, S>
where +

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<K> Trace for BTreeSet<K>
where + K: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = K::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<K> Trace for Set<K>
where + K: Trace + Sort,

source§

const MAY_CONTAIN_REFERENCES: bool = K::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<K, S> Trace for HashSet<K, S>
where K: Trace, - S: Send + Sync + 'static,

source§

const MAY_CONTAIN_REFERENCES: bool = K::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<K, V> Trace for BTreeMap<K, V>
where + S: Send + Sync + 'static,

source§

const MAY_CONTAIN_REFERENCES: bool = K::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<K, V> Trace for BTreeMap<K, V>
where K: Trace, - V: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = _

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<K, V> Trace for Map<K, V>
where + V: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = _

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<K, V> Trace for Map<K, V>
where K: Trace + Sort, - V: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = _

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<K, V, S> Trace for HashMap<K, V, S>
where + V: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = _

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<K, V, S> Trace for HashMap<K, V, S>
where K: Trace, V: Trace, - S: Send + Sync + 'static,

source§

const MAY_CONTAIN_REFERENCES: bool = _

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<T> Trace for BinaryHeap<T>
where - T: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<T> Trace for LinkedList<T>
where - T: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<T> Trace for VecDeque<T>
where - T: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<T> Trace for Vec<T>
where - T: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<T, const N: usize> Trace for [T; N]
where - T: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

Implementors§

\ No newline at end of file + S: Send + Sync + 'static,

source§

const MAY_CONTAIN_REFERENCES: bool = _

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<T> Trace for BinaryHeap<T>
where + T: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<T> Trace for LinkedList<T>
where + T: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<T> Trace for VecDeque<T>
where + T: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<T> Trace for Vec<T>
where + T: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

source§

impl<T, const N: usize> Trace for [T; N]
where + T: Trace,

source§

const MAY_CONTAIN_REFERENCES: bool = T::MAY_CONTAIN_REFERENCES

source§

fn trace(&self, tracer: &mut Tracer<'_>)

Implementors§

\ No newline at end of file diff --git a/main/search-index.js b/main/search-index.js index ac9589f..60ae1df 100644 --- a/main/search-index.js +++ b/main/search-index.js @@ -1,5 +1,5 @@ var searchIndex = new Map(JSON.parse('[\ -["refuse",{"doc":"Refuse","t":"FFKFKFTKYKFFKRKYFFFFNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNMNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","n":["AnyRef","AnyRoot","Collectable","CollectionGuard","ContainsNoRefs","LocalPool","MAY_CONTAIN_REFERENCES","MapAs","MapAs","NoMapping","Ref","Root","SimpleType","Target","Trace","Trace","Tracer","WouldDeadlock","YieldComplete","Yielder","acquire","allocating_in","architecture","as_any","as_any","as_mut","as_ref","as_ref","as_ref","as_root","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","cast","cast","cast","cast","cast","cast","cast","cast","cast","cast","cast_into","cast_into","cast_into","cast_into","cast_into","cast_into","cast_into","cast_into","cast_into","cast_into","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","collect","collect","compare","compare","compare","compare","coordinated_yield","default","deref","downcast_ref","downcast_root","downgrade","downgrade_any","drop","drop","drop","drop","enter","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_cast","from_cast","from_cast","from_cast","from_cast","from_cast","from_cast","from_cast","from_cast","from_cast","hash","hash","hash","hash","into","into","into","into","into","into","into","into","into","into","into_any_root","load","load","load","load_mapped","map_as","mark","new","new","partial_cmp","partial_cmp","partial_cmp","partial_cmp","ptr_eq","root_count","to_any_root","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","trace","trace","trace","trace","try_collect","try_collect","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_while_unlocked","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","wait","while_unlocked","yield_to_collector"],"q":[[0,"refuse"],[220,"core::option"],[221,"intentional::cast"],[222,"core::cmp"],[223,"core::cmp"],[224,"core::cmp"],[225,"core::fmt"],[226,"core::hash"],[227,"core::convert"],[228,"core::convert"],[229,"core::result"],[230,"core::any"]],"d":["A type-erased garbage collected reference.","A type-erased root garbage collected reference.","A type that can be garbage collected.","A guard that prevents garbage collection while held.","A type that can be garbage collected that cannot contain …","A pool of garbage collected values.","If true, this type may contain references and should have …","A mapping from one type to another.","","A type that implements MapAs with an empty implementation.","A reference to data stored in a garbage collector.","A root reference to a T that has been allocated in the …","A type that can contain no Ref<T>s and has an empty MapAs …","The target type of the mapping.","A type that can find and mark any references it has.","","A tracer for the garbage collector.","An error indicating an operation would deadlock.","A marker indicating that a coordinated yield has completed.","A pending yield to the garbage collector.","Acquires a lock that prevents the garbage collector from …","Returns a guard that allocates from pool.","Architecture overview of the underlying design of Refuse.","Returns this reference as an untyped reference.","Returns an untyped “weak” reference to this root.","","","","","Loads a root reference to the underlying data. Returns None…","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Invokes the garbage collector.","Manually invokes the garbage collector.","","","","","Perform a coordinated yield to the collector, if needed.","","","Returns a Ref<T>.","Returns a Root<T> if the underlying reference points to a T…","Returns a “weak” reference to this root.","Returns an untyped “weak” reference erased to this …","","","","","Acquires a collection guard for this pool.","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","","","Returns the argument unchanged.","","","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns this root as an untyped root.","Loads a reference to the underlying data. Returns None if …","Loads a reference to the underlying data. Returns None if T…","Loads a reference to the underlying data. Returns None if …","Returns a reference to the result of MapAs::map_as(), if …","Maps self to target type.","Marks collectable as being referenced, ensuring it is not …","Stores value in the garbage collector, returning a root …","Stores value in the garbage collector, returning a “weak…","","","","","Returns true if these two references point to the same …","Returns the current number of root references to this …","Returns an untyped root reference.","","","","","","","Traces all refrences that this value references.","","","","Invokes the garbage collector.","Manually invokes the garbage collector.","","","","","","","","","","","","","","","","","","","","","Executes unlocked while this guard is temporarily released.","","","","","","","","","","","Waits for the garbage collector to finish the current …","Executes unlocked while this guard is temporarily released.","Yield to the garbage collector, if needed."],"i":[0,0,0,0,0,0,34,0,0,0,0,0,0,27,0,0,0,0,0,0,1,1,0,3,6,1,1,7,3,3,2,1,14,16,28,7,3,10,6,4,2,1,14,16,28,7,3,10,6,4,2,1,14,16,28,7,3,10,6,4,2,1,14,16,28,7,3,10,6,4,7,3,10,6,4,7,3,10,6,4,7,3,6,4,0,1,7,3,6,4,1,2,7,4,4,7,7,2,1,7,6,2,7,7,7,7,7,3,3,3,3,3,10,6,4,7,3,10,10,2,1,14,16,28,7,3,10,6,6,4,4,4,4,4,2,1,14,16,28,7,3,10,6,4,7,3,6,4,2,1,14,16,28,7,3,10,6,4,7,3,6,4,4,27,28,7,3,7,3,6,4,7,7,7,7,3,10,6,4,10,34,7,3,4,0,1,2,1,14,16,28,7,3,10,6,4,2,1,14,16,28,7,3,10,6,4,1,2,1,14,16,28,7,3,10,6,4,14,1,1],"f":"````````````````````{{}b}{{bd}b}`{{{f{c}}}hj}{lh}{bb}0{{{n{c}}}{{f{c}}}j}{{{f{c}}}{{f{c}}}{}}{{{f{c}}b}{{A`{{n{c}}}}}j}{ce{}{}}0000000000000000000{cg{}{}{{Ab{e}}}}0000000001111111111{{{n{c}}}{{n{c}}}j}4{AdAd}{ll}{hh}{{ce}Af{}{}}0000{{{n{c}}{n{c}}}Ah{jAj}}{{{f{c}}{f{c}}}Ah{}}{{ll}Ah}{{hh}Ah}{{}Af}{bAf}{{ce}Ah{}{}}000{{bc}Af{{Bb{Al}{{An{B`}}}}}}{{}d}{{{n{c}}}ej{}}{h{{f{c}}}j}{{hb}{{A`{{n{c}}}}}j}{{{n{c}}}{{f{c}}}j}{{{n{c}}}hj}{dAf}9{{{n{c}}}Afj}{lAf}{db}{{{n{c}}{f{c}}}Bdj}{{{n{c}}h}Bdj}0{{{n{c}}{n{c}}}Bd{jBf}}2{{{f{c}}{n{c}}}Bdj}0{{{f{c}}h}Bdj}{{{f{c}}{f{c}}}Bd{}}1{{AdAd}Bd}{{ll}Bd}{{hh}Bd}{{{n{c}}Bh}Bj{jBl}}{{{f{c}}Bh}Bj{jBl}}{{AdBh}Bj}0{cc{}}0000000{{{n{c}}}lj}1{{{f{c}}}hj}0{{{n{c}}}hj}3{hh}4444444444{{{n{c}}e}Af{jBn}C`}{{{f{c}}e}Af{}C`}{{lc}AfC`}{{hc}AfC`}{ce{}{}}0000000008{{{f{c}}b}{{A`{c}}}j}{l{{A`{c}}}j}{{hb}{{A`{c}}}j}{{hb}{{A`{c}}}Cb}{{{Cf{}{{Cd{c}}}}}cCb}{{Chc}Af{{Cj{h}}}}{{ce}{{n{c}}}j{{Cl{b}}}}{{ce}{{f{c}}}j{{Cl{b}}}}{{{n{c}}{n{c}}}{{A`{Ah}}}{jCn}}{{{f{c}}{f{c}}}{{A`{Ah}}}{}}{{ll}{{A`{Ah}}}}{{hh}{{A`{Ah}}}}{{{n{c}}{n{c}}}Bdj}{{{n{c}}}D`j}{{{n{c}}}lj}?????{cDb{}}{{DdCh}Af}{{{n{c}}Ch}Afj}{{{f{c}}Ch}Afj}{{hCh}Af}{{}{{Df{AfAd}}}}{b{{Df{AfAd}}}}{c{{Df{e}}}{}{}}0000000000000000000{{be}{{Df{cAd}}}{}{{Bb{}{{An{c}}}}}}{cDh{}}000000000{AlB`}{{be}c{}{{Bb{}{{An{c}}}}}}{bAf}","c":[],"p":[[5,"CollectionGuard",0],[5,"LocalPool",0],[5,"Ref",0],[5,"AnyRef",0],[10,"Collectable",0],[5,"AnyRoot",0],[5,"Root",0],[6,"Option",220],[10,"CastFrom",221],[5,"WouldDeadlock",0],[1,"unit"],[6,"Ordering",222],[10,"Ord",222],[5,"Yielder",0],[17,"Output"],[5,"YieldComplete",0],[10,"FnOnce",223],[1,"bool"],[10,"PartialEq",222],[5,"Formatter",224],[8,"Result",224],[10,"Debug",224],[10,"Hash",225],[10,"Hasher",225],[10,"Sized",226],[17,"Target"],[10,"MapAs",0],[5,"Tracer",0],[10,"Into",227],[10,"AsRef",227],[10,"PartialOrd",222],[1,"u64"],[5,"String",228],[10,"Trace",0],[6,"Result",229],[5,"TypeId",230]],"b":[[102,"impl-PartialEq%3C%26Ref%3CT%3E%3E-for-Root%3CT%3E"],[103,"impl-PartialEq%3CAnyRef%3E-for-Root%3CT%3E"],[104,"impl-PartialEq%3C%26AnyRef%3E-for-Root%3CT%3E"],[105,"impl-PartialEq-for-Root%3CT%3E"],[106,"impl-PartialEq%3CRef%3CT%3E%3E-for-Root%3CT%3E"],[107,"impl-PartialEq%3CRoot%3CT%3E%3E-for-Ref%3CT%3E"],[108,"impl-PartialEq%3C%26Root%3CT%3E%3E-for-Ref%3CT%3E"],[109,"impl-PartialEq%3C%26AnyRef%3E-for-Ref%3CT%3E"],[110,"impl-PartialEq-for-Ref%3CT%3E"],[111,"impl-PartialEq%3CAnyRef%3E-for-Ref%3CT%3E"],[117,"impl-Display-for-WouldDeadlock"],[118,"impl-Debug-for-WouldDeadlock"],[129,"impl-From%3CRef%3CT%3E%3E-for-AnyRef"],[130,"impl-From%3C%26Ref%3CT%3E%3E-for-AnyRef"],[131,"impl-From%3C%26Root%3CT%3E%3E-for-AnyRef"],[133,"impl-From%3C%26AnyRef%3E-for-AnyRef"]]}]\ +["refuse",{"doc":"Refuse","t":"FFKFKFTKYKFFKRKYFFFFNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNMNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","n":["AnyRef","AnyRoot","Collectable","CollectionGuard","ContainsNoRefs","LocalPool","MAY_CONTAIN_REFERENCES","MapAs","MapAs","NoMapping","Ref","Root","SimpleType","Target","Trace","Trace","Tracer","WouldDeadlock","YieldComplete","Yielder","acquire","allocating_in","architecture","as_any","as_any","as_mut","as_ref","as_ref","as_ref","as_root","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","cast","cast","cast","cast","cast","cast","cast","cast","cast","cast","cast_into","cast_into","cast_into","cast_into","cast_into","cast_into","cast_into","cast_into","cast_into","cast_into","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","collect","collect","compare","compare","compare","compare","coordinated_yield","default","deref","downcast_ref","downcast_root","downgrade","downgrade_any","drop","drop","drop","drop","enter","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_cast","from_cast","from_cast","from_cast","from_cast","from_cast","from_cast","from_cast","from_cast","from_cast","hash","hash","hash","hash","into","into","into","into","into","into","into","into","into","into","into_any_root","load","load","load","load_mapped","map_as","mark","new","new","partial_cmp","partial_cmp","partial_cmp","partial_cmp","ptr_eq","root_count","to_any_root","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","trace","trace","trace","trace","try_acquire","try_collect","try_collect","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_while_unlocked","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","wait","while_unlocked","yield_to_collector"],"q":[[0,"refuse"],[222,"core::option"],[223,"intentional::cast"],[224,"core::cmp"],[225,"core::cmp"],[226,"core::cmp"],[227,"core::fmt"],[228,"core::hash"],[229,"core::convert"],[230,"core::convert"],[231,"core::result"],[232,"core::any"]],"d":["A type-erased garbage collected reference.","A type-erased root garbage collected reference.","A type that can be garbage collected.","A guard that prevents garbage collection while held.","A type that can be garbage collected that cannot contain …","A pool of garbage collected values.","If true, this type may contain references and should have …","A mapping from one type to another.","","A type that implements MapAs with an empty implementation.","A reference to data stored in a garbage collector.","A root reference to a T that has been allocated in the …","A type that can contain no Ref<T>s and has an empty MapAs …","The target type of the mapping.","A type that can find and mark any references it has.","","A tracer for the garbage collector.","An error indicating an operation would deadlock.","A marker indicating that a coordinated yield has completed.","A pending yield to the garbage collector.","Acquires a lock that prevents the garbage collector from …","Returns a guard that allocates from pool.","Architecture overview of the underlying design of Refuse.","Returns this reference as an untyped reference.","Returns an untyped “weak” reference to this root.","","","","","Loads a root reference to the underlying data. Returns None…","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Invokes the garbage collector.","Manually invokes the garbage collector.","","","","","Perform a coordinated yield to the collector, if needed.","","","Returns a Ref<T>.","Returns a Root<T> if the underlying reference points to a T…","Returns a “weak” reference to this root.","Returns an untyped “weak” reference erased to this …","","","","","Acquires a collection guard for this pool.","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","","","","Returns the argument unchanged.","","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns this root as an untyped root.","Loads a reference to the underlying data. Returns None if …","Loads a reference to the underlying data. Returns None if T…","Loads a reference to the underlying data. Returns None if …","Returns a reference to the result of MapAs::map_as(), if …","Maps self to target type.","Marks collectable as being referenced, ensuring it is not …","Stores value in the garbage collector, returning a root …","Stores value in the garbage collector, returning a “weak…","","","","","Returns true if these two references point to the same …","Returns the current number of root references to this …","Returns an untyped root reference.","","","","","","","Traces all refrences that this value references.","","","","Acquires a lock that prevents the garbage collector from …","Invokes the garbage collector.","Manually invokes the garbage collector.","","","","","","","","","","","","","","","","","","","","","Executes unlocked while this guard is temporarily released.","","","","","","","","","","","Waits for the garbage collector to finish the current …","Executes unlocked while this guard is temporarily released.","Yield to the garbage collector, if needed."],"i":[0,0,0,0,0,0,34,0,0,0,0,0,0,27,0,0,0,0,0,0,1,1,0,3,6,1,1,7,3,3,2,1,14,16,28,7,3,10,6,4,2,1,14,16,28,7,3,10,6,4,2,1,14,16,28,7,3,10,6,4,2,1,14,16,28,7,3,10,6,4,7,3,10,6,4,7,3,10,6,4,7,3,6,4,0,1,7,3,6,4,1,2,7,4,4,7,7,2,1,7,6,2,7,7,7,7,7,3,3,3,3,3,10,6,4,7,3,10,10,4,2,1,14,16,28,7,3,10,6,6,4,4,4,4,4,2,1,14,16,28,7,3,10,6,4,7,3,6,4,2,1,14,16,28,7,3,10,6,4,7,3,6,4,4,27,28,7,3,7,3,6,4,7,7,7,7,3,10,6,4,10,34,7,3,4,1,0,1,2,1,14,16,28,7,3,10,6,4,2,1,14,16,28,7,3,10,6,4,1,2,1,14,16,28,7,3,10,6,4,14,1,1],"f":"````````````````````{{}b}{{bd}b}`{{{f{c}}}hj}{lh}{bb}0{{{n{c}}}{{f{c}}}j}{{{f{c}}}{{f{c}}}{}}{{{f{c}}b}{{A`{{n{c}}}}}j}{ce{}{}}0000000000000000000{cg{}{}{{Ab{e}}}}0000000001111111111{{{n{c}}}{{n{c}}}j}4{AdAd}{ll}{hh}{{ce}Af{}{}}0000{{{n{c}}{n{c}}}Ah{jAj}}{{{f{c}}{f{c}}}Ah{}}{{ll}Ah}{{hh}Ah}{{}Af}{bAf}{{ce}Ah{}{}}000{{bc}Af{{Bb{Al}{{An{B`}}}}}}{{}d}{{{n{c}}}ej{}}{h{{f{c}}}j}{{hb}{{A`{{n{c}}}}}j}{{{n{c}}}{{f{c}}}j}{{{n{c}}}hj}{dAf}9{{{n{c}}}Afj}{lAf}{db}{{{n{c}}{f{c}}}Bdj}{{{n{c}}h}Bdj}10{{{n{c}}{n{c}}}Bd{jBf}}{{{f{c}}h}Bdj}{{{f{c}}{n{c}}}Bdj}10{{{f{c}}{f{c}}}Bd{}}{{AdAd}Bd}{{ll}Bd}{{hh}Bd}{{{n{c}}Bh}Bj{jBl}}{{{f{c}}Bh}Bj{jBl}}{{AdBh}Bj}0{{hBh}Bj}{cc{}}0000000{{{n{c}}}lj}1{{{f{c}}}hj}{hh}{{{n{c}}}hj}244444444444{{{n{c}}e}Af{jBn}C`}{{{f{c}}e}Af{}C`}{{lc}AfC`}{{hc}AfC`}{ce{}{}}0000000008{{{f{c}}b}{{A`{c}}}j}{l{{A`{c}}}j}{{hb}{{A`{c}}}j}{{hb}{{A`{c}}}Cb}{{{Cf{}{{Cd{c}}}}}cCb}{{Chc}Af{{Cj{h}}}}{{ce}{{n{c}}}j{{Cl{b}}}}{{ce}{{f{c}}}j{{Cl{b}}}}{{{n{c}}{n{c}}}{{A`{Ah}}}{jCn}}{{{f{c}}{f{c}}}{{A`{Ah}}}{}}{{ll}{{A`{Ah}}}}{{hh}{{A`{Ah}}}}{{{n{c}}{n{c}}}Bdj}{{{n{c}}}D`j}{{{n{c}}}lj}?????{cDb{}}{{DdCh}Af}{{{n{c}}Ch}Afj}{{{f{c}}Ch}Afj}{{hCh}Af}{{}{{A`{b}}}}{{}{{Df{AfAd}}}}{b{{Df{AfAd}}}}{c{{Df{e}}}{}{}}0000000000000000000{{be}{{Df{cAd}}}{}{{Bb{}{{An{c}}}}}}{cDh{}}000000000{AlB`}{{be}c{}{{Bb{}{{An{c}}}}}}{bAf}","c":[],"p":[[5,"CollectionGuard",0],[5,"LocalPool",0],[5,"Ref",0],[5,"AnyRef",0],[10,"Collectable",0],[5,"AnyRoot",0],[5,"Root",0],[6,"Option",222],[10,"CastFrom",223],[5,"WouldDeadlock",0],[1,"unit"],[6,"Ordering",224],[10,"Ord",224],[5,"Yielder",0],[17,"Output"],[5,"YieldComplete",0],[10,"FnOnce",225],[1,"bool"],[10,"PartialEq",224],[5,"Formatter",226],[8,"Result",226],[10,"Debug",226],[10,"Hash",227],[10,"Hasher",227],[10,"Sized",228],[17,"Target"],[10,"MapAs",0],[5,"Tracer",0],[10,"Into",229],[10,"AsRef",229],[10,"PartialOrd",224],[1,"u64"],[5,"String",230],[10,"Trace",0],[6,"Result",231],[5,"TypeId",232]],"b":[[102,"impl-PartialEq%3C%26Ref%3CT%3E%3E-for-Root%3CT%3E"],[103,"impl-PartialEq%3C%26AnyRef%3E-for-Root%3CT%3E"],[104,"impl-PartialEq%3CRef%3CT%3E%3E-for-Root%3CT%3E"],[105,"impl-PartialEq%3CAnyRef%3E-for-Root%3CT%3E"],[106,"impl-PartialEq-for-Root%3CT%3E"],[107,"impl-PartialEq%3C%26AnyRef%3E-for-Ref%3CT%3E"],[108,"impl-PartialEq%3CRoot%3CT%3E%3E-for-Ref%3CT%3E"],[109,"impl-PartialEq%3CAnyRef%3E-for-Ref%3CT%3E"],[110,"impl-PartialEq%3C%26Root%3CT%3E%3E-for-Ref%3CT%3E"],[111,"impl-PartialEq-for-Ref%3CT%3E"],[117,"impl-Debug-for-WouldDeadlock"],[118,"impl-Display-for-WouldDeadlock"],[130,"impl-From%3CRef%3CT%3E%3E-for-AnyRef"],[131,"impl-From%3C%26AnyRef%3E-for-AnyRef"],[132,"impl-From%3C%26Root%3CT%3E%3E-for-AnyRef"],[133,"impl-From%3C%26Ref%3CT%3E%3E-for-AnyRef"]]}]\ ]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; else if (window.initSearch) window.initSearch(searchIndex); diff --git a/main/settings.html b/main/settings.html index ebef280..8041a07 100644 --- a/main/settings.html +++ b/main/settings.html @@ -1,2 +1,2 @@ -Settings +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/main/src/refuse/lib.rs.html b/main/src/refuse/lib.rs.html index d28412f..7b74a60 100644 --- a/main/src/refuse/lib.rs.html +++ b/main/src/refuse/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source 2893 2894 2895 +2896 +2897 +2898 +2899 +2900 +2901 +2902 +2903 +2904 +2905 +2906 +2907 +2908
#![doc = include_str!("../README.md")]
 
 use core::slice;
@@ -3048,7 +3061,7 @@ 

Files

/// implementation invoked. pub mod architecture {} -#[derive(Clone, Copy, Eq, PartialEq, Hash, Ord, PartialOrd)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Ord, PartialOrd)] struct CollectorThreadId(u32); impl CollectorThreadId { @@ -3126,7 +3139,6 @@

Files

struct TraceRequest { thread: CollectorThreadId, bins: Arc<dyn AnyBin>, - mark_bits: u8, mark_one_sender: Arc<Sender<MarkRequest>>, } @@ -3135,7 +3147,6 @@

Files

type_index: TypeIndex, slot_generation: u32, bin_id: BinId, - mark_bits: u8, mark_one_sender: Arc<Sender<MarkRequest>>, } @@ -3200,11 +3211,9 @@

Files

let trace_receiver = trace_receiver.clone(); move || { while let Ok(request) = trace_receiver.recv() { - request.bins.trace(&mut Tracer::new( - request.thread, - &request.mark_one_sender, - request.mark_bits, - )); + request + .bins + .trace(&mut Tracer::new(request.thread, &request.mark_one_sender)); } } }); @@ -3365,7 +3374,6 @@

Files

.send(TraceRequest { thread: *id, bins: by_type.field(i).expect("length checked").value.clone(), - mark_bits: self.mark_bits, mark_one_sender: mark_one_sender.clone(), }) .expect("tracer stopped"); @@ -3378,7 +3386,6 @@

Files

type_index, slot_generation, bin_id, - mark_bits, mark_one_sender, } = { if Arc::strong_count(&mark_one_sender) == 1 { @@ -3402,11 +3409,11 @@

Files

.get(&type_index) .expect("areas are never deallocated") .clone(); - if bins.mark_one(mark_bits, slot_generation, bin_id) { + if bins.mark_one(self.mark_bits, slot_generation, bin_id) { bins.trace_one( slot_generation, bin_id, - &mut Tracer::new(thread, &mark_one_sender, self.mark_bits), + &mut Tracer::new(thread, &mark_one_sender), ); } } @@ -3698,6 +3705,11 @@

Files

this } + fn try_acquire() -> Option<Self> { + let global = &GlobalCollector::get().info; + global.reader_state.read().then_some(Self { global }) + } + fn acquire_recursive() -> Self { let this = Self { global: &GlobalCollector::get().info, @@ -3811,6 +3823,32 @@

Files

thread: Guarded::Thread(thread), } } + + /// Acquires a lock that prevents the garbage collector from running. + /// + /// This guard is used to provide read-only access to garbage collected + /// allocations. + /// + /// # Panics + /// + /// A panic will occur if this function is called outside of code executed + /// by [`collected()`]. + #[must_use] + pub fn try_acquire() -> Option<Self> { + let thread = ThreadPool::get(); + + let depth = thread.push_guard(); + + let collector = if depth == 0 { + CollectorReadGuard::try_acquire()? + } else { + CollectorReadGuard::acquire_recursive() + }; + Some(Self { + collector, + thread: Guarded::Thread(thread), + }) + } } impl CollectionGuard<'_> { @@ -4338,19 +4376,13 @@

Files

/// [`Ref<T>`]s they contain. pub struct Tracer<'a> { tracing_thread: CollectorThreadId, - mark_bit: u8, mark_one_sender: &'a Arc<Sender<MarkRequest>>, } impl<'a> Tracer<'a> { - fn new( - thread: CollectorThreadId, - mark_one_sender: &'a Arc<Sender<MarkRequest>>, - mark_bit: u8, - ) -> Self { + fn new(thread: CollectorThreadId, mark_one_sender: &'a Arc<Sender<MarkRequest>>) -> Self { Self { tracing_thread: thread, - mark_bit, mark_one_sender, } } @@ -4365,7 +4397,6 @@

Files

type_index: collectable.type_index, slot_generation: collectable.slot_generation, bin_id: collectable.bin_id, - mark_bits: self.mark_bit, mark_one_sender: self.mark_one_sender.clone(), }) .assert("marker thread not running"); @@ -5053,7 +5084,7 @@

Files

fn mark_one(&self, mark_bits: u8, slot_generation: u32, bin: BinId) -> bool { let slot = &self.slabs[bin.slab() as usize].slots[usize::from(bin.slot())]; - slot.state.mark(mark_bits, slot_generation) + slot.state.mark(mark_bits, slot_generation) && T::MAY_CONTAIN_REFERENCES } fn sweep(&self, mark_bits: u8) -> usize { @@ -5142,7 +5173,7 @@

Files

} } -#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)] +#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] struct BinId(u32); impl BinId { @@ -5311,7 +5342,7 @@

Files

let mut this: Box<Self> = unsafe { Box::from_raw(alloc_zeroed(Layout::new::<Self>()).cast()) }; this.slots[0] = Slot { - state: SlotState::new_allocated(T::MAY_CONTAIN_REFERENCES), + state: SlotState::new_allocated(), value: UnsafeCell::new(SlotData { allocated: ManuallyDrop::new(first_value), }), @@ -5410,15 +5441,10 @@

Files

impl SlotState { const ALLOCATED: u64 = 1 << 33; - const MARK_OFFSET: u32 = 35; - const SHOULD_TRACE: u64 = 1 << 34; + const MARK_OFFSET: u32 = 34; - const fn new_allocated(should_trace: bool) -> Self { - if should_trace { - Self(AtomicU64::new(Self::ALLOCATED | Self::SHOULD_TRACE)) - } else { - Self(AtomicU64::new(Self::ALLOCATED)) - } + const fn new_allocated() -> Self { + Self(AtomicU64::new(Self::ALLOCATED)) } fn generation(&self) -> Option<u32> { @@ -5473,7 +5499,7 @@

Files

state |= mark_bits << Self::MARK_OFFSET; self.0.store(state, Ordering::Release); - state & Self::SHOULD_TRACE != 0 + true } fn sweep(&self, mark_bits: u8) -> SlotSweepStatus { @@ -5559,7 +5585,7 @@

Files

GlobalCollector::get().info.wait_for_collection(now); } -#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)] struct TypeIndex(u32); impl TypeIndex { @@ -5654,7 +5680,7 @@

Files

unsafe impl Sync for AnyRoot {} /// A type-erased garbage collected reference. -#[derive(Clone, Copy, Eq, PartialEq, PartialOrd, Ord)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord)] pub struct AnyRef { bin_id: BinId, creating_thread: CollectorThreadId, diff --git a/main/trait.impl/core/fmt/trait.Debug.js b/main/trait.impl/core/fmt/trait.Debug.js index b4347ee..bce40e4 100644 --- a/main/trait.impl/core/fmt/trait.Debug.js +++ b/main/trait.impl/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"refuse":[["impl Debug for WouldDeadlock"],["impl<T> Debug for Ref<T>
where\n T: Collectable + Debug,
"],["impl<T> Debug for Root<T>
where\n T: Collectable + Debug,
"]] +"refuse":[["impl Debug for AnyRef"],["impl Debug for WouldDeadlock"],["impl<T> Debug for Ref<T>
where\n T: Collectable + Debug,
"],["impl<T> Debug for Root<T>
where\n T: Collectable + Debug,
"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file