pub struct RefCellComputeChannel<Server> { /* private fields */ }Expand description
A channel using a ref cell to access the server with mutability.
§Important
Only use this channel if you don’t use any threading in your application, otherwise it will panic or cause undefined behaviors.
This is mosly useful for no-std environments where threads aren’t supported, otherwise prefer
the mutex or the mpsc channels.
Implementations§
Source§impl<Server> RefCellComputeChannel<Server>where
Server: ComputeServer,
impl<Server> RefCellComputeChannel<Server>where
Server: ComputeServer,
Trait Implementations§
Source§impl<S> Clone for RefCellComputeChannel<S>
impl<S> Clone for RefCellComputeChannel<S>
Source§impl<Server> ComputeChannel<Server> for RefCellComputeChannel<Server>where
Server: ComputeServer,
impl<Server> ComputeChannel<Server> for RefCellComputeChannel<Server>where
Server: ComputeServer,
Source§fn read(&self, handle: &Handle<Server>) -> Reader<Vec<u8>>
fn read(&self, handle: &Handle<Server>) -> Reader<Vec<u8>>
Given a handle, returns owned resource as bytes
Source§fn create(&self, resource: &[u8]) -> Handle<Server>
fn create(&self, resource: &[u8]) -> Handle<Server>
Given a resource as bytes, stores it and returns the resource handle
Source§fn empty(&self, size: usize) -> Handle<Server>
fn empty(&self, size: usize) -> Handle<Server>
Reserves
size bytes in the storage, and returns a handle over themSource§impl<Server: Debug> Debug for RefCellComputeChannel<Server>
impl<Server: Debug> Debug for RefCellComputeChannel<Server>
impl<Server: ComputeServer> Send for RefCellComputeChannel<Server>
This is unsafe, since no concurrency is supported by the RefCell channel.
However using this channel should only be done in single threaded environments such as no-std.
impl<Server: ComputeServer> Sync for RefCellComputeChannel<Server>
Auto Trait Implementations§
impl<Server> !RefUnwindSafe for RefCellComputeChannel<Server>
impl<Server> !UnwindSafe for RefCellComputeChannel<Server>
impl<Server> Freeze for RefCellComputeChannel<Server>
impl<Server> Unpin for RefCellComputeChannel<Server>
impl<Server> UnsafeUnpin for RefCellComputeChannel<Server>
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