[−][src]Struct sunrise_fs::interface::storage::PartitionStorage
Wrapper over a IStorage that permit to access only a partition.
Fields
inner: Arc<Mutex<Box<dyn IStorage<Error = Error>>>>
The backing IStorage implementation
partition_start: u64
The start of the partition.
partition_len: u64
The size of the partition.
Implementations
impl PartitionStorage
[src]
pub fn new(
inner: Arc<Mutex<Box<dyn IStorage<Error = Error>>>>,
partition_start: u64,
partition_len: u64
) -> Self
[src]
inner: Arc<Mutex<Box<dyn IStorage<Error = Error>>>>,
partition_start: u64,
partition_len: u64
) -> Self
Create a new PartitionStorage
Trait Implementations
impl Debug for PartitionStorage
[src]
impl IStorage for PartitionStorage
[src]
fn set_size(&mut self, _new_size: u64) -> LibUserResult<()>
[src]
impl StorageDevice for PartitionStorage
[src]
type Error = Error
Error type returned by this block device when an operation fails
fn read(&mut self, offset: u64, buf: &mut [u8]) -> Result<(), Error>
[src]
fn write(&mut self, offset: u64, buf: &[u8]) -> Result<(), Error>
[src]
fn flush(&mut self) -> LibUserResult<()>
[src]
fn len(&mut self) -> Result<u64, Error>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for PartitionStorage
impl Send for PartitionStorage
impl Sync for PartitionStorage
impl Unpin for PartitionStorage
impl !UnwindSafe for PartitionStorage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SizedIPCBuffer for T
[src]
fn size(&self) -> usize
[src]
fn is_cool(addr: usize, size: usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(addr: usize, _size: usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(addr: usize, _size: usize) -> &'a mut T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,