Skip to content

Commit

Permalink
Make chan_ptr module private
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Jul 28, 2022
1 parent 862e9fa commit b653f8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/inbox.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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};

Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit b653f8d

Please sign in to comment.