diff --git a/main/refuse/all.html b/main/refuse/all.html index 1a09d0d..4a608df 100644 --- a/main/refuse/all.html +++ b/main/refuse/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Traits

Derive Macros

Functions

\ No newline at end of file +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 21cd683..ddfbc42 100644 --- a/main/refuse/architecture/index.html +++ b/main/refuse/architecture/index.html @@ -1,4 +1,4 @@ -refuse::architecture - Rust

Module refuse::architecture

source ·
Expand description

Architecture overview of the underlying design of Refuse.

+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 collectors can only run when it knows no threads are currently accessing diff --git a/main/refuse/derive.MapAs.html b/main/refuse/derive.MapAs.html index 0b0742f..87bdae7 100644 --- a/main/refuse/derive.MapAs.html +++ b/main/refuse/derive.MapAs.html @@ -1,4 +1,4 @@ -MapAs in refuse - Rust

Derive Macro refuse::MapAs

#[derive(MapAs)]
+MapAs in refuse - Rust

Derive Macro refuse::MapAs

#[derive(MapAs)]
 {
     // Attributes available to this derive:
     #[map_as]
diff --git a/main/refuse/derive.Trace.html b/main/refuse/derive.Trace.html
index 646492c..e704626 100644
--- a/main/refuse/derive.Trace.html
+++ b/main/refuse/derive.Trace.html
@@ -1,4 +1,4 @@
-Trace in refuse - Rust

Derive Macro refuse::Trace

#[derive(Trace)]
+Trace in refuse - Rust

Derive Macro refuse::Trace

#[derive(Trace)]
 {
     // Attributes available to this derive:
     #[trace]
diff --git a/main/refuse/fn.collect.html b/main/refuse/fn.collect.html
index d9985d4..3b428c8 100644
--- a/main/refuse/fn.collect.html
+++ b/main/refuse/fn.collect.html
@@ -1,4 +1,4 @@
-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 8369f91..200d5df 100644 --- a/main/refuse/fn.try_collect.html +++ b/main/refuse/fn.try_collect.html @@ -1,4 +1,4 @@ -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 be8c377..35c7ab7 100644 --- a/main/refuse/index.html +++ b/main/refuse/index.html @@ -1,4 +1,4 @@ -refuse - Rust

Crate refuse

source ·
Expand description

§Refuse

+refuse - Rust

Crate refuse

source ·
Expand description

§Refuse

An easy-to-use, incremental, multi-threaded garbage collector for Rust.

//! A basic usage example demonstrating the garbage collector.
diff --git a/main/refuse/struct.AnyRef.html b/main/refuse/struct.AnyRef.html
index c8320dc..e3cccad 100644
--- a/main/refuse/struct.AnyRef.html
+++ b/main/refuse/struct.AnyRef.html
@@ -1,4 +1,4 @@
-AnyRef in refuse - Rust

Struct refuse::AnyRef

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

A type-erased garbage collected reference.

+AnyRef in refuse - Rust

Struct refuse::AnyRef

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

A type-erased garbage collected reference.

Implementations§

source§

impl AnyRef

source

pub const fn downcast_ref<T>(&self) -> Ref<T>
where T: Collectable,

Returns a Ref<T>.

This function does not do any type checking. If T is not the correct diff --git a/main/refuse/struct.AnyRoot.html b/main/refuse/struct.AnyRoot.html index daf2995..f2205fe 100644 --- a/main/refuse/struct.AnyRoot.html +++ b/main/refuse/struct.AnyRoot.html @@ -1,4 +1,4 @@ -AnyRoot in refuse - Rust

Struct refuse::AnyRoot

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

A type-erased root garbage collected reference.

+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.

diff --git a/main/refuse/struct.CollectionGuard.html b/main/refuse/struct.CollectionGuard.html index 7dcd173..527074b 100644 --- a/main/refuse/struct.CollectionGuard.html +++ b/main/refuse/struct.CollectionGuard.html @@ -1,4 +1,4 @@ -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.

diff --git a/main/refuse/struct.LocalPool.html b/main/refuse/struct.LocalPool.html index 0e13fe3..b4570ff 100644 --- a/main/refuse/struct.LocalPool.html +++ b/main/refuse/struct.LocalPool.html @@ -1,4 +1,4 @@ -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 diff --git a/main/refuse/struct.Ref.html b/main/refuse/struct.Ref.html index 2613a43..faa0a08 100644 --- a/main/refuse/struct.Ref.html +++ b/main/refuse/struct.Ref.html @@ -1,4 +1,4 @@ -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.

diff --git a/main/refuse/struct.Root.html b/main/refuse/struct.Root.html index 06b8ca8..51e8b3f 100644 --- a/main/refuse/struct.Root.html +++ b/main/refuse/struct.Root.html @@ -1,4 +1,4 @@ -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.

diff --git a/main/refuse/struct.Tracer.html b/main/refuse/struct.Tracer.html index b376dc4..8f7df8c 100644 --- a/main/refuse/struct.Tracer.html +++ b/main/refuse/struct.Tracer.html @@ -1,4 +1,4 @@ -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 diff --git a/main/refuse/struct.WouldDeadlock.html b/main/refuse/struct.WouldDeadlock.html index d7810e6..f886cfd 100644 --- a/main/refuse/struct.WouldDeadlock.html +++ b/main/refuse/struct.WouldDeadlock.html @@ -1,4 +1,4 @@ -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 diff --git a/main/refuse/struct.YieldComplete.html b/main/refuse/struct.YieldComplete.html index 06f02fd..2fae027 100644 --- a/main/refuse/struct.YieldComplete.html +++ b/main/refuse/struct.YieldComplete.html @@ -1,4 +1,4 @@ -YieldComplete in refuse - Rust

Struct refuse::YieldComplete

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

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

Struct refuse::YieldComplete

source ·
pub struct YieldComplete { /* private fields */ }
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 cba4dcf..16ae25c 100644 --- a/main/refuse/struct.Yielder.html +++ b/main/refuse/struct.Yielder.html @@ -1,4 +1,4 @@ -Yielder in refuse - Rust

Struct refuse::Yielder

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

A pending yield to the garbage collector.

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

Trait refuse::Collectable

source ·
pub trait Collectable:
+Collectable in refuse - Rust

Trait refuse::Collectable

source ·
pub trait Collectable:
     Trace
     + MapAs
     + Send
diff --git a/main/refuse/trait.ContainsNoRefs.html b/main/refuse/trait.ContainsNoRefs.html
index ac4b7e6..9829693 100644
--- a/main/refuse/trait.ContainsNoRefs.html
+++ b/main/refuse/trait.ContainsNoRefs.html
@@ -1,4 +1,4 @@
-ContainsNoRefs in refuse - Rust

Trait refuse::ContainsNoRefs

source ·
pub trait ContainsNoRefs:
+ContainsNoRefs in refuse - Rust

Trait refuse::ContainsNoRefs

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

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

diff --git a/main/refuse/trait.MapAs.html b/main/refuse/trait.MapAs.html index 805fd13..bd9a20f 100644 --- a/main/refuse/trait.MapAs.html +++ b/main/refuse/trait.MapAs.html @@ -1,4 +1,4 @@ -MapAs in refuse - Rust

Trait refuse::MapAs

source ·
pub trait MapAs:
+MapAs in refuse - Rust

Trait refuse::MapAs

source ·
pub trait MapAs:
     Send
     + Sync
     + 'static {
diff --git a/main/refuse/trait.NoMapping.html b/main/refuse/trait.NoMapping.html
index 6613fb5..72eb8b5 100644
--- a/main/refuse/trait.NoMapping.html
+++ b/main/refuse/trait.NoMapping.html
@@ -1,4 +1,4 @@
-NoMapping in refuse - Rust

Trait refuse::NoMapping

source ·
pub trait NoMapping:
+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.

diff --git a/main/refuse/trait.SimpleType.html b/main/refuse/trait.SimpleType.html index 18133a0..4d1f564 100644 --- a/main/refuse/trait.SimpleType.html +++ b/main/refuse/trait.SimpleType.html @@ -1,4 +1,4 @@ -SimpleType in refuse - Rust

Trait refuse::SimpleType

source ·
pub trait SimpleType:
+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 diff --git a/main/refuse/trait.Trace.html b/main/refuse/trait.Trace.html index 7540ee7..5b89d38 100644 --- a/main/refuse/trait.Trace.html +++ b/main/refuse/trait.Trace.html @@ -1,4 +1,4 @@ -Trace in refuse - Rust

Trait refuse::Trace

source ·
pub trait Trace:
+Trace in refuse - Rust

Trait refuse::Trace

source ·
pub trait Trace:
     Send
     + Sync
     + 'static {
diff --git a/main/refuse_macros/all.html b/main/refuse_macros/all.html
index fab41e4..9d0eaa1 100644
--- a/main/refuse_macros/all.html
+++ b/main/refuse_macros/all.html
@@ -1 +1 @@
-List of all items in this crate

List of all items

Derive Macros

\ No newline at end of file +List of all items in this crate

List of all items

Derive Macros

\ No newline at end of file diff --git a/main/refuse_macros/derive.MapAs.html b/main/refuse_macros/derive.MapAs.html index 4155746..df30d3a 100644 --- a/main/refuse_macros/derive.MapAs.html +++ b/main/refuse_macros/derive.MapAs.html @@ -1,4 +1,4 @@ -MapAs in refuse_macros - Rust

Derive Macro refuse_macros::MapAs

source ·
#[derive(MapAs)]
+MapAs in refuse_macros - Rust

Derive Macro refuse_macros::MapAs

source ·
#[derive(MapAs)]
 {
     // Attributes available to this derive:
     #[map_as]
diff --git a/main/refuse_macros/derive.Trace.html b/main/refuse_macros/derive.Trace.html
index aa122ad..cd5ce60 100644
--- a/main/refuse_macros/derive.Trace.html
+++ b/main/refuse_macros/derive.Trace.html
@@ -1,4 +1,4 @@
-Trace in refuse_macros - Rust

Derive Macro refuse_macros::Trace

source ·
#[derive(Trace)]
+Trace in refuse_macros - Rust

Derive Macro refuse_macros::Trace

source ·
#[derive(Trace)]
 {
     // Attributes available to this derive:
     #[trace]
diff --git a/main/refuse_macros/index.html b/main/refuse_macros/index.html
index 4d79d56..5676c1b 100644
--- a/main/refuse_macros/index.html
+++ b/main/refuse_macros/index.html
@@ -1,3 +1,3 @@
-refuse_macros - Rust

Crate refuse_macros

source ·
Expand description

Macros for the Refuse garbage +refuse_macros - Rust

Crate refuse_macros

source ·
Expand description

Macros for the Refuse garbage collector.

Derive Macros§

  • Derives the refuse::MapAs trait for a given struct or enum.
  • Derives the refuse::Trace trait for a given struct or enum.
\ No newline at end of file diff --git a/main/refuse_pool/all.html b/main/refuse_pool/all.html index fa7c71f..e4e6cc8 100644 --- a/main/refuse_pool/all.html +++ b/main/refuse_pool/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

\ No newline at end of file +List of all items in this crate

List of all items

Structs

\ No newline at end of file diff --git a/main/refuse_pool/index.html b/main/refuse_pool/index.html index fd00d04..8600a64 100644 --- a/main/refuse_pool/index.html +++ b/main/refuse_pool/index.html @@ -1,4 +1,4 @@ -refuse_pool - Rust

Crate refuse_pool

source ·
Expand description

Garbage-collected “interned” strings.

+refuse_pool - Rust

Crate refuse_pool

source ·
Expand description

Garbage-collected “interned” strings.

Interning is a process of making many equal things share the same underlying resource. This crate introduces two types that are powered by the Refuse garbage collector:

diff --git a/main/refuse_pool/struct.RefString.html b/main/refuse_pool/struct.RefString.html index 0b26c8e..a82d35f 100644 --- a/main/refuse_pool/struct.RefString.html +++ b/main/refuse_pool/struct.RefString.html @@ -1,4 +1,4 @@ -RefString in refuse_pool - Rust

Struct refuse_pool::RefString

source ·
pub struct RefString(/* private fields */);
Expand description

A weak reference to a garbage collected, interned string.

+RefString in refuse_pool - Rust

Struct refuse_pool::RefString

source ·
pub struct RefString(/* private fields */);
Expand description

A weak reference to a garbage collected, interned string.

Implementations§

source§

impl RefString

source

pub fn new<'a>(s: impl Into<Cow<'a, str>>) -> Self

Returns a reference to a garbage collected string that contains s.

If another RootString or RefString exists already with the same contents as s, it will be returned and s will be dropped.

diff --git a/main/refuse_pool/struct.RootString.html b/main/refuse_pool/struct.RootString.html index d5e9644..223e20b 100644 --- a/main/refuse_pool/struct.RootString.html +++ b/main/refuse_pool/struct.RootString.html @@ -1,4 +1,4 @@ -RootString in refuse_pool - Rust

Struct refuse_pool::RootString

source ·
pub struct RootString(/* private fields */);
Expand description

A “root” reference to a garbage collected, interned string.

+RootString in refuse_pool - Rust

Struct refuse_pool::RootString

source ·
pub struct RootString(/* private fields */);
Expand description

A “root” reference to a garbage collected, interned string.

This type is cheap to check equality because it ensures each unique string is allocated only once, and references are reused automatically.

Implementations§

source§

impl RootString

source

pub fn new<'a>(