GithubHelp home page GithubHelp logo

book's Introduction

DEPRECATED: This repo has been deprecated, the new website is live on https://actix.rs/docs/actix/ and any updates will happen on https://github.com/actix/actix-website.

User guides Build Status Join the chat at https://gitter.im/actix/actix

Using this library

This repository is an mdBook project. To use it for this project:

  • Install mdBook if you haven't already: cargo install mdbook
  • In the actix directory: mdbook watch -o
    • This automatically opens your browser and watches the md files for changing
    • You'll still have to refresh the page, as there is no hot-reloading for mdbook

book's People

Contributors

adwhit avatar ami44 avatar ava57r avatar brandur avatar bwasty avatar dhbradshaw avatar dholbert avatar doumanash avatar fafhrd91 avatar firstyear avatar flip111 avatar glademiller avatar ilgaz avatar johntitor avatar kellytk avatar majorbreakfast avatar memoryruins avatar messense avatar meteficha avatar mockersf avatar niklasf avatar radix avatar rbtcollins avatar rivertam avatar robjtede avatar rofrol avatar rvlzzr avatar savekirk avatar svenstaro avatar tazjin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

book's Issues

Update to 0.9/0.10-alpha

The current book is written with actix 0.7, it's quite old. We should rewrite this book with actix 0.9/0.10-alpha.

Example does not build

The example listed in https://actix.rs/book/actix/sec-2-actor.html#complete-example does not build for me. I saw two problems:

  • I had to update the Cargo.toml file to include a dependency on the futures crate.

  • I see the following compiler error after adding the dependency on the futures crate:

  Compiling actor-ping v0.1.0 (/home/akhi/projects/actor-ping)
warning: unused import: `futures::Future`
 --> src/main.rs:2:5
  |
2 | use futures::Future;
  |     ^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0599]: no method named `map` found for type `actix::address::message::Request<MyActor, Ping>` in the current scope
  --> src/main.rs:52:14
   |
52 |             .map(|res| match res {
   |              ^^^ method not found in `actix::address::message::Request<MyActor, Ping>`
   |
   = note: the method `map` exists but the following trait bounds were not satisfied:
           `&mut actix::address::message::Request<MyActor, Ping> : futures::stream::Stream`
           `&mut actix::address::message::Request<MyActor, Ping> : std::iter::Iterator`
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
1  | use futures::future::Future;
   |

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `actor-ping`.

To learn more, run the command again with --verbose.

The version I am using is:

$ cargo --version
cargo 1.41.0

Example from the Arbiter chapter fails to compile

The example in arbiter chapter does not compile.

I'm compiling on rust nightly rustc 1.43.0-nightly (8aa9d2014 2020-02-21)

warning: unused import: `futures::Future`
 --> src/main.rs:4:5
  |
4 | use futures::Future;
  |     ^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0599]: no method named `map_err` found for struct `actix::prelude::Request<SumActor, Value>` in the current scope
  --> src/main.rs:63:10
   |
63 |         .map_err(|e| {
   |          ^^^^^^^ method not found in `actix::prelude::Request<SumActor, Value>`
   |
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
3  | use crate::futures::TryFutureExt;
   |

error[E0599]: no method named `map` found for struct `actix::prelude::Request<DisplayActor, Display>` in the current scope
  --> src/main.rs:74:41
   |
74 |             dis_addr.send(Display(res)).map(move |_| ()).map_err(|_| ())
   |                                         ^^^ method not found in `actix::prelude::Request<DisplayActor, Display>`
   |
   = note: the method `map` exists but the following trait bounds were not satisfied:
           `&mut actix::prelude::Request<DisplayActor, Display> : std::iter::Iterator`
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
3  | use crate::futures::FutureExt;
   |

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
error: could not compile `actix-middleware-tryout`.

To learn more, run the command again with --verbose.

Tried adding suggested use statements, but no luck.

warning: unused import: `futures::Future`
 --> src/main.rs:4:5
  |
4 | use futures::Future;
  |     ^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0599]: no method named `map_err` found for struct `futures::future::Map<actix::prelude::Request<DisplayActor, Display>, [closure@src/main.rs:76:45: 76:56]>` in the current scope
  --> src/main.rs:76:58
   |
76 |             dis_addr.send(Display(res)).map(move |_| ()).map_err(|_| ())
   |                                                          ^^^^^^^ method not found in `futures::future::Map<actix::prelude::Request<DisplayActor, Display>, [closure@src/main.rs:76:45: 76:56]>`
   |
   = note: the method `map_err` exists but the following trait bounds were not satisfied:
           `&futures::future::Map<actix::prelude::Request<DisplayActor, Display>, [closure@src/main.rs:76:45: 76:56]> : futures::TryFutureExt`
           `&mut futures::future::Map<actix::prelude::Request<DisplayActor, Display>, [closure@src/main.rs:76:45: 76:56]> : futures::TryFutureExt`
           `futures::future::Map<actix::prelude::Request<DisplayActor, Display>, [closure@src/main.rs:76:45: 76:56]> : futures::TryFutureExt`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `actix-middleware-tryout`.

To learn more, run the command again with --verbose.

Would love to see the supervisor and registry in the user guide.

Hello!

We love actix actor framework and we've been using it in our production development for an year now. We've been using the registry functionality in our code, and mostly been reading the API documentation and the code to figure out how to use the features, but it would be really nice if these features were explained by the developers in the user guide.

Would love to see the context page

Please don't stop just when it was getting interesting! Really like the guild - hope you find a little time to push it forwards a little. - thankyou!

Addresses typo

Here it shows to exactly the same code snippets saying

Same example, but returned address is thread safe and can be sent to different thread.

which is probably wrong.

Home page does not exist

The home page listed (actix.rs/book) does not appear to exist. It returns a Page Not Found message.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.