Skip to main content

ForceSyncSend

Struct ForceSyncSend 

Source
pub struct ForceSyncSend<T>(/* private fields */);
Expand description

Wrapper to share a block device behind Arc without adding locking.

§Safety

This type provides unsynchronized interior mutability. Only use it when all access is externally serialized (single-threaded execution or a higher-level mutex).

Implementations§

Source§

impl<T> ForceSyncSend<T>

Source

pub const fn new(inner: T) -> Self

Trait Implementations§

Source§

impl<B: BlockDevice> BlockDevice for ForceSyncSend<B>

Source§

type Error = <B as BlockDevice>::Error

The errors that the BlockDevice can return. Must be debug formattable.
Source§

fn read( &self, blocks: &mut [Block], start: BlockIdx, reason: &str, ) -> Result<(), Self::Error>

Read one or more blocks, starting at the given block index.
Source§

fn write(&self, blocks: &[Block], start: BlockIdx) -> Result<(), Self::Error>

Write one or more blocks, starting at the given block index.
Source§

fn num_blocks(&self) -> Result<BlockCount, Self::Error>

Determine how many blocks this device can hold.
Source§

impl<T: Send> Send for ForceSyncSend<T>

Source§

impl<T: Send> Sync for ForceSyncSend<T>

Auto Trait Implementations§

§

impl<T> !Freeze for ForceSyncSend<T>

§

impl<T> !RefUnwindSafe for ForceSyncSend<T>

§

impl<T> Unpin for ForceSyncSend<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for ForceSyncSend<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for ForceSyncSend<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> GetTypeRegistration for T

Source§

impl<T> Reflect for T
where T: 'static,

Source§

impl<T> ReflectTypePath for T