Struct burn_compute::channel::MutexComputeChannel
source · pub struct MutexComputeChannel<Server> { /* private fields */ }Expand description
The MutexComputeChannel ensures thread-safety by locking the server on every operation
Implementations§
source§impl<Server> MutexComputeChannel<Server>where
Server: ComputeServer,
impl<Server> MutexComputeChannel<Server>where Server: ComputeServer,
Trait Implementations§
source§impl<S> Clone for MutexComputeChannel<S>
impl<S> Clone for MutexComputeChannel<S>
source§impl<Server> ComputeChannel<Server> for MutexComputeChannel<Server>where
Server: ComputeServer,
impl<Server> ComputeChannel<Server> for MutexComputeChannel<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, data: &[u8]) -> Handle<Server>
fn create(&self, data: &[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 themAuto Trait Implementations§
impl<Server> !RefUnwindSafe for MutexComputeChannel<Server>
impl<Server> Send for MutexComputeChannel<Server>where Server: Send,
impl<Server> Sync for MutexComputeChannel<Server>where Server: Send,
impl<Server> Unpin for MutexComputeChannel<Server>
impl<Server> !UnwindSafe for MutexComputeChannel<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