pub struct FsCoreDevice { /* private fields */ }Expand description
Opaque handle wrapping an Arc<dyn BlockDevice>. Allocated by sister
crates’ constructors and freed via fs_core_device_close.
Implementations§
Source§impl FsCoreDevice
impl FsCoreDevice
Sourcepub fn into_handle(inner: Arc<dyn BlockDevice>) -> *mut FsCoreDevice
pub fn into_handle(inner: Arc<dyn BlockDevice>) -> *mut FsCoreDevice
Internal constructor — sister crates use this to wrap their own
device types (Qcow2Reader, FileDevice, OwnedSlice, etc.) into the
shared handle type. Returns a Box::into_raw pointer ready to hand
across the FFI boundary.
Sourcepub fn inner(&self) -> &Arc<dyn BlockDevice>
pub fn inner(&self) -> &Arc<dyn BlockDevice>
Borrow the inner device. Arc::clone it if you want shared
ownership — e.g. when handing the device to a slice adapter while
keeping the original handle alive.
Auto Trait Implementations§
impl !RefUnwindSafe for FsCoreDevice
impl !UnwindSafe for FsCoreDevice
impl Freeze for FsCoreDevice
impl Send for FsCoreDevice
impl Sync for FsCoreDevice
impl Unpin for FsCoreDevice
impl UnsafeUnpin for FsCoreDevice
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