diff --git a/main/benchmarks/all.html b/main/benchmarks/all.html index 76af1a7..77c030d 100644 --- a/main/benchmarks/all.html +++ b/main/benchmarks/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

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

List of all items

\ No newline at end of file diff --git a/main/benchmarks/index.html b/main/benchmarks/index.html index 9705cc8..1c35218 100644 --- a/main/benchmarks/index.html +++ b/main/benchmarks/index.html @@ -1 +1 @@ -benchmarks - Rust

Crate benchmarks

source ·
\ No newline at end of file +benchmarks - Rust

Crate benchmarks

source ·
\ No newline at end of file diff --git a/main/help.html b/main/help.html index 9a69752..5df7ccf 100644 --- a/main/help.html +++ b/main/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/main/refuse/all.html b/main/refuse/all.html index 8275ace..a2d9c97 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 d628f5f..f07e942 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 3e8650b..bcc0301 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 6e3e7c6..76996ab 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 a2fbfc2..2c36f1b 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 a1d2e94..a222a50 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 664badc..8869a57 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 aac8dc8..698da6f 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 359ea21..002e1ad 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 b8bbed3..e0c2335 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 1d59892..4c98dcd 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 3886c16..cf8fb04 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 9de0e7d..6c5a8c7 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 2d53a2e..d823945 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 c0d4379..25a2fc9 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 59afc10..a1897f3 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;
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 234131f..ce8987c 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 2e8a482..1539c49 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 f200602..a536a98 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 28f8013..a704179 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 6bc96a3..53f7df7 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 f09fa9d..55838ac 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 8530886..6b1496a 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 3dccea7..2f82d67 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 10e01b6..3ad2a23 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 c33ef10..0885226 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 a5b08ea..0db487b 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§

\ No newline at end of file diff --git a/main/refuse_pool/all.html b/main/refuse_pool/all.html index 360b38d..31507e1 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 cfc53b6..25487d3 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 aa1205d..c46a8ea 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 6c3b675..f3fc160 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>( diff --git a/main/settings.html b/main/settings.html index c6835c5..806a6de 100644 --- a/main/settings.html +++ b/main/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/main/src/benchmarks/lib.rs.html b/main/src/benchmarks/lib.rs.html index aef309b..4ea8ceb 100644 --- a/main/src/benchmarks/lib.rs.html +++ b/main/src/benchmarks/lib.rs.html @@ -1,3 +1,3 @@ -lib.rs - source
1
+lib.rs - source
1
 

 
\ No newline at end of file diff --git a/main/src/refuse/lib.rs.html b/main/src/refuse/lib.rs.html index 508f4e3..084d271 100644 --- a/main/src/refuse/lib.rs.html +++ b/main/src/refuse/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
diff --git a/main/src/refuse_macros/lib.rs.html b/main/src/refuse_macros/lib.rs.html
index 1a45f01..998f22c 100644
--- a/main/src/refuse_macros/lib.rs.html
+++ b/main/src/refuse_macros/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -239,6 +239,12 @@
 239
 240
 241
+242
+243
+244
+245
+246
+247
 
//! Macros for the [Refuse](https://github.com/khonsulabs/refuse) garbage
 //! collector.
 
@@ -401,9 +407,11 @@
     } in &variants
     {
         let field_attr = TraceFieldAttr::from_attributes(attrs)?;
-        if !field_attr.ignore {
-            let trace = match fields {
-                syn::Fields::Named(fields) => {
+        let trace = match fields {
+            syn::Fields::Named(fields) => {
+                if field_attr.ignore {
+                    quote!(Self::#ident { .. } => {})
+                } else {
                     let mut field_names = Vec::new();
                     for field in &fields.named {
                         let field_attr = TraceFieldAttr::from_attributes(&field.attrs)?;
@@ -419,7 +427,11 @@
                         #(refuse::Trace::trace(#field_names, tracer);)*
                     }}
                 }
-                syn::Fields::Unnamed(fields) => {
+            }
+            syn::Fields::Unnamed(fields) => {
+                if field_attr.ignore {
+                    quote!(Self::#ident(..) => {})
+                } else {
                     let mut field_names = Vec::new();
                     for (index, field) in fields.unnamed.iter().enumerate() {
                         let field_attr = TraceFieldAttr::from_attributes(&field.attrs)?;
@@ -434,12 +446,12 @@
                         #(refuse::Trace::trace(#field_names, tracer);)*
                     }}
                 }
-                syn::Fields::Unit => {
-                    quote! {Self::#ident => {}}
-                }
-            };
-            traces.push(trace);
-        }
+            }
+            syn::Fields::Unit => {
+                quote! {Self::#ident => {}}
+            }
+        };
+        traces.push(trace);
     }
 
     let type_mays = all_types
diff --git a/main/src/refuse_pool/lib.rs.html b/main/src/refuse_pool/lib.rs.html
index b55c684..610c8d8 100644
--- a/main/src/refuse_pool/lib.rs.html
+++ b/main/src/refuse_pool/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source
1
+lib.rs - source
1
 2
 3
 4