pub struct GptPartition { /* private fields */ }Expand description
A single partition in a GPT device.
Implementations§
Source§impl GptPartition
impl GptPartition
pub fn new( gpt: &Arc<GptManager>, block_client: Arc<RemoteBlockClient>, info: PartitionInfo, ) -> Arc<Self>
pub async fn terminate(&self)
Sourcepub fn update_info(&self, info: PartitionInfo) -> PartitionInfo
pub fn update_info(&self, info: PartitionInfo) -> PartitionInfo
Replaces the partition info, returning its old value.
pub fn block_size(&self) -> u32
pub fn block_count(&self) -> u64
pub async fn attach_vmo(&self, vmo: &Vmo) -> Result<VmoId, Status>
pub async fn detach_vmo(&self, vmoid: VmoId) -> Result<(), Status>
pub fn open_passthrough_session(&self, session: ServerEnd<SessionMarker>)
pub fn get_info(&self) -> DeviceInfo
pub async fn read( &self, device_block_offset: u64, block_count: u32, vmo_id: &VmoId, vmo_offset: u64, opts: ReadOptions, trace_flow_id: Option<NonZero<u64>>, ) -> Result<(), Status>
pub async fn write( &self, device_block_offset: u64, block_count: u32, vmo_id: &VmoId, vmo_offset: u64, opts: WriteOptions, trace_flow_id: Option<NonZero<u64>>, ) -> Result<(), Status>
pub async fn flush( &self, trace_flow_id: Option<NonZero<u64>>, ) -> Result<(), Status>
pub async fn trim( &self, device_block_offset: u64, block_count: u32, trace_flow_id: Option<NonZero<u64>>, ) -> Result<(), Status>
Auto Trait Implementations§
impl !Freeze for GptPartition
impl !RefUnwindSafe for GptPartition
impl Send for GptPartition
impl Sync for GptPartition
impl Unpin for GptPartition
impl UnsafeUnpin for GptPartition
impl !UnwindSafe for GptPartition
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more