pub struct Channel<T: Debug + ZeroCopySend + 'static> { /* private fields */ }Expand description
Pub/sub channel with a paired event service.
Implementations§
Source§impl<T: Payload> Channel<T>
impl<T: Payload> Channel<T>
Sourcepub fn open_or_create(
node: &Node<Service>,
topic: &str,
) -> Result<Arc<Self>, ExecutorError>
pub fn open_or_create( node: &Node<Service>, topic: &str, ) -> Result<Arc<Self>, ExecutorError>
Open or create the channel by topic name.
Sourcepub fn publisher(self: &Arc<Self>) -> Result<Publisher<T>, ExecutorError>
pub fn publisher(self: &Arc<Self>) -> Result<Publisher<T>, ExecutorError>
Create a new publisher attached to this channel.
Sourcepub fn subscriber(self: &Arc<Self>) -> Result<Subscriber<T>, ExecutorError>
pub fn subscriber(self: &Arc<Self>) -> Result<Subscriber<T>, ExecutorError>
Create a new subscriber attached to this channel.
Auto Trait Implementations§
impl<T> Freeze for Channel<T>
impl<T> !RefUnwindSafe for Channel<T>
impl<T> Send for Channel<T>
impl<T> Sync for Channel<T>
impl<T> Unpin for Channel<T>where
T: Unpin,
impl<T> UnsafeUnpin for Channel<T>
impl<T> !UnwindSafe for Channel<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more