diff --git a/src/context.rs b/src/context.rs index 4f70c872..806dd515 100644 --- a/src/context.rs +++ b/src/context.rs @@ -11,9 +11,9 @@ use futures_util::future::{self, Either}; use futures_util::FutureExt; use crate::envelope::{Shutdown, Span}; -use crate::inbox::chan_ptr::RxStrong; use crate::inbox::rx::ReceiveFuture as InboxReceiveFuture; use crate::inbox::ActorMessage; +use crate::inbox::RxStrong; use crate::{inbox, Actor, Address, Error, WeakAddress}; /// `Context` is used to control how the actor is managed and to get the actor's address from inside diff --git a/src/inbox.rs b/src/inbox.rs index 0a459e31..57726244 100644 --- a/src/inbox.rs +++ b/src/inbox.rs @@ -1,7 +1,7 @@ //! Latency is prioritised over most accurate prioritisation. Specifically, at most one low priority //! message may be handled before piled-up higher priority messages will be handled. -pub mod chan_ptr; +mod chan_ptr; pub mod rx; pub mod tx; mod waiting_receiver; @@ -15,13 +15,12 @@ use std::sync::{atomic, Arc, Mutex, Weak}; use std::task::{Context, Poll, Waker}; use std::{cmp, mem}; +pub use chan_ptr::{ChanPtr, RefCountPolicy, RxStrong, RxWeak, TxEither, TxStrong, TxWeak}; use event_listener::{Event, EventListener}; pub use rx::Receiver; pub use tx::Sender; use crate::envelope::{BroadcastEnvelope, MessageEnvelope, Shutdown}; -use crate::inbox::chan_ptr::RxStrong; -use crate::inbox::chan_ptr::TxStrong; use crate::inbox::waiting_receiver::{FulfillHandle, WaitingReceiver}; use crate::{Actor, Error}; diff --git a/src/lib.rs b/src/lib.rs index 8d343c68..36d98d60 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,10 +38,10 @@ pub mod prelude { /// This module contains types representing the strength of an address's reference counting, which /// influences whether the address will keep the actor alive for as long as it lives. pub mod refcount { - pub use crate::inbox::chan_ptr::RefCountPolicy as RefCounter; - pub use crate::inbox::chan_ptr::TxEither as Either; - pub use crate::inbox::chan_ptr::TxStrong as Strong; - pub use crate::inbox::chan_ptr::TxWeak as Weak; + pub use crate::inbox::RefCountPolicy as RefCounter; + pub use crate::inbox::TxEither as Either; + pub use crate::inbox::TxStrong as Strong; + pub use crate::inbox::TxWeak as Weak; } /// Defines that an [`Actor`] can handle a given message `M`.