pub struct Channel<T: ?Sized + 'static> { /* private fields */ }Implementations§
Source§impl<T: Transport> Channel<T>
impl<T: Transport> Channel<T>
Sourcepub fn new(inner: &'static T) -> Self
pub fn new(inner: &'static T) -> Self
Creates a new external channel.
This method should not be called, as the channel is already created by the device macro.
Sourcepub fn as_dyn(&self) -> DynChannel
pub fn as_dyn(&self) -> DynChannel
Converts this channel into a dynamic one.
This can be useful if you want to pass the channel to an embassy task as they can’t have generic parameters.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Channel<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Channel<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Channel<T>
impl<T> Sync for Channel<T>
impl<T> Unpin for Channel<T>where
T: ?Sized,
impl<T> UnwindSafe for Channel<T>where
T: RefUnwindSafe + ?Sized,
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