pub struct Channel { /* private fields */ }Expand description
Basic channel.
Channel is an entity that has a name and could be read, written or subscribed to.
Implementations§
Source§impl Channel
impl Channel
Source§impl Channel
impl Channel
Sourcepub fn put_ref<R: WriteRequest + ?Sized>(
&mut self,
req: &R,
) -> Result<Put<'_>, Error>
pub fn put_ref<R: WriteRequest + ?Sized>( &mut self, req: &R, ) -> Result<Put<'_>, Error>
Make write request by reference.
Sourcepub fn get_with<F: Callback>(&mut self, func: F) -> Get<'_, F> ⓘ
pub fn get_with<F: Callback>(&mut self, func: F) -> Get<'_, F> ⓘ
Make read request and call closure when it’s done, successfully or not.
Sourcepub fn subscribe_with<F: Queue>(&mut self, func: F) -> Subscription<'_, F>
pub fn subscribe_with<F: Queue>(&mut self, func: F) -> Subscription<'_, F>
Subscribe to channel updates and call closure each time when update occured.
Source§impl Channel
impl Channel
Sourcepub fn into_typed<V: Value + ?Sized>(
self,
) -> Result<TypedChannel<V>, (Error, Self)>
pub fn into_typed<V: Value + ?Sized>( self, ) -> Result<TypedChannel<V>, (Error, Self)>
Convert into TypedChannel.
Conversion is successful if actual channel type matches the one passed as a parameter V.
Trait Implementations§
Source§impl<V: Value + ?Sized> From<TypedChannel<V>> for Channel
impl<V: Value + ?Sized> From<TypedChannel<V>> for Channel
Source§fn from(original: TypedChannel<V>) -> Self
fn from(original: TypedChannel<V>) -> Self
Converts to this type from the input type.
impl Send for Channel
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl !Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
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