pub struct Vmo(/* private fields */);Expand description
A virtual memory object (VMO) in a remote FDomain.
Implementations§
Source§impl Vmo
impl Vmo
Sourcepub fn read(
&self,
offset: u64,
size: u64,
) -> impl Future<Output = Result<Vec<u8>, Error>> + use<>
pub fn read( &self, offset: u64, size: u64, ) -> impl Future<Output = Result<Vec<u8>, Error>> + use<>
Read size bytes from the VMO at offset.
Sourcepub async fn read_slice(&self, buf: &mut [u8], offset: u64) -> Result<(), Error>
pub async fn read_slice(&self, buf: &mut [u8], offset: u64) -> Result<(), Error>
Read from the VMO into a buffer. Returns Ok(()) on success.
Sourcepub fn write(
&self,
data: &[u8],
offset: u64,
) -> impl Future<Output = Result<(), Error>> + use<>
pub fn write( &self, data: &[u8], offset: u64, ) -> impl Future<Output = Result<(), Error>> + use<>
Write all data to the VMO at offset.
Sourcepub fn get_size(&self) -> impl Future<Output = Result<u64, Error>> + use<>
pub fn get_size(&self) -> impl Future<Output = Result<u64, Error>> + use<>
Get the size of the VMO.
Sourcepub fn set_size(
&self,
size: u64,
) -> impl Future<Output = Result<(), Error>> + use<>
pub fn set_size( &self, size: u64, ) -> impl Future<Output = Result<(), Error>> + use<>
Set the size of the VMO.
Trait Implementations§
Source§impl AsHandleRef for Vmo
impl AsHandleRef for Vmo
Source§impl EncodableAsHandle for Vmo
impl EncodableAsHandle for Vmo
Source§type Dialect = FDomainResourceDialect
type Dialect = FDomainResourceDialect
What resource dialect can encode this object as a handle.
Source§impl<E: HandleEncoder + ?Sized> Encode<Handle, E> for Vmo
impl<E: HandleEncoder + ?Sized> Encode<Handle, E> for Vmo
Source§fn encode(
self,
encoder: &mut E,
out: &mut MaybeUninit<Handle>,
constraint: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut E, out: &mut MaybeUninit<Handle>, constraint: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
Source§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<E: HandleEncoder + ?Sized> EncodeOption<OptionalHandle, E> for Vmo
impl<E: HandleEncoder + ?Sized> EncodeOption<OptionalHandle, E> for Vmo
Source§fn encode_option(
this: Option<Self>,
encoder: &mut E,
out: &mut MaybeUninit<OptionalHandle>,
constraint: (),
) -> Result<(), EncodeError>
fn encode_option( this: Option<Self>, encoder: &mut E, out: &mut MaybeUninit<OptionalHandle>, constraint: (), ) -> Result<(), EncodeError>
Encodes this optional value into an encoder and output.
impl Eq for Vmo
Source§impl FromWire<Handle> for Vmo
impl FromWire<Handle> for Vmo
Source§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl FromWireOption<OptionalHandle> for Vmo
impl FromWireOption<OptionalHandle> for Vmo
Source§fn from_wire_option(wire: OptionalHandle) -> Option<Self>
fn from_wire_option(wire: OptionalHandle) -> Option<Self>
Converts the given owned value to an option of this type.
Source§impl HandleBased for Vmo
impl HandleBased for Vmo
Source§fn invalidate(&mut self)
fn invalidate(&mut self)
Drop ownership of this handle and make it invalid, without closing the handle.
Source§fn close(self) -> impl Future<Output = Result<(), Error>>
fn close(self) -> impl Future<Output = Result<(), Error>>
Closes this handle. Surfaces errors that dropping the handle will not.
Source§fn duplicate_handle(
&self,
rights: Rights,
) -> impl Future<Output = Result<Self, Error>>
fn duplicate_handle( &self, rights: Rights, ) -> impl Future<Output = Result<Self, Error>>
Duplicate this handle.
Source§fn replace_handle(
self,
rights: Rights,
) -> impl Future<Output = Result<Self, Error>>
fn replace_handle( self, rights: Rights, ) -> impl Future<Output = Result<Self, Error>>
Replace this handle with an equivalent one with different rights.
Source§fn into_handle(self) -> Handle
fn into_handle(self) -> Handle
Convert this handle-based value into a pure
Handle.Source§fn from_handle(handle: Handle) -> Self
fn from_handle(handle: Handle) -> Self
Construct a new handle-based value from a
Handle.Source§fn into_handle_based<H: HandleBased>(self) -> H
fn into_handle_based<H: HandleBased>(self) -> H
Turn this handle-based value into one of a different type.
Source§fn from_handle_based<H: HandleBased>(h: H) -> Self
fn from_handle_based<H: HandleBased>(h: H) -> Self
Turn another handle-based type into this one.
Source§fn is_invalid(&self) -> bool
fn is_invalid(&self) -> bool
Check whether this handle is valid.
Source§impl Ord for Vmo
impl Ord for Vmo
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Vmo
impl PartialOrd for Vmo
impl StructuralPartialEq for Vmo
Auto Trait Implementations§
impl !RefUnwindSafe for Vmo
impl !UnwindSafe for Vmo
impl Freeze for Vmo
impl Send for Vmo
impl Sync for Vmo
impl Unpin for Vmo
impl UnsafeUnpin for Vmo
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,
Source§impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
Source§fn from_wire_option(wire: Box<'_, W>) -> Option<T>
fn from_wire_option(wire: Box<'_, W>) -> Option<T>
Converts the given owned value to an option of this type.
§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]