aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/by-example/singletons.md
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2019-04-21 20:25:59 +0200
committerJorge Aparicio <jorge@japaric.io>2019-05-01 20:49:25 +0200
commit3adc9c31f3fd46af7e3a42a5adba7471452f06e1 (patch)
treeabd96443848f086082fc3a1dbf794dba9a0ff501 /book/en/src/by-example/singletons.md
parentd538f5b17cf0ad482cd803d7fbaada3349d6485e (diff)
update the book
Diffstat (limited to 'book/en/src/by-example/singletons.md')
-rw-r--r--book/en/src/by-example/singletons.md26
1 files changed, 0 insertions, 26 deletions
diff --git a/book/en/src/by-example/singletons.md b/book/en/src/by-example/singletons.md
deleted file mode 100644
index 0823f05..0000000
--- a/book/en/src/by-example/singletons.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Singletons
-
-The `app` attribute is aware of [`owned-singleton`] crate and its [`Singleton`]
-attribute. When this attribute is applied to one of the resources the runtime
-will perform the `unsafe` initialization of the singleton for you, ensuring that
-only a single instance of the singleton is ever created.
-
-[`owned-singleton`]: ../../api/owned_singleton/index.html
-[`Singleton`]: ../../api/owned_singleton_macros/attr.Singleton.html
-
-Note that when using the `Singleton` attribute you'll need to have the
-`owned_singleton` in your dependencies.
-
-Below is an example that uses the `Singleton` attribute on a chunk of memory
-and then uses the singleton instance as a fixed-size memory pool using one of
-the [`alloc-singleton`] abstractions.
-
-[`alloc-singleton`]: https://crates.io/crates/alloc-singleton
-
-``` rust
-{{#include ../../../../examples/singleton.rs}}
-```
-
-``` console
-$ cargo run --example singleton
-{{#include ../../../../ci/expected/singleton.run}}```