pub struct RamdiskControllerProxy { /* private fields */ }
Implementations§
Source§impl RamdiskControllerProxy
impl RamdiskControllerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.ramdisk/RamdiskController.
Sourcepub fn take_event_stream(&self) -> RamdiskControllerEventStream
pub fn take_event_stream(&self) -> RamdiskControllerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn create(
&self,
block_size: u64,
block_count: u64,
type_guid: Option<&Guid>,
) -> QueryResponseFut<RamdiskControllerCreateResult, DefaultFuchsiaResourceDialect>
pub fn create( &self, block_size: u64, block_count: u64, type_guid: Option<&Guid>, ) -> QueryResponseFut<RamdiskControllerCreateResult, DefaultFuchsiaResourceDialect>
Initializes a new Ramdisk instance with the provided block size and block count.
Takes an optional type_guid
, which may be queried from the ramdisk instance.
Sourcepub fn create_from_vmo(
&self,
vmo: Vmo,
) -> QueryResponseFut<RamdiskControllerCreateFromVmoResult, DefaultFuchsiaResourceDialect>
pub fn create_from_vmo( &self, vmo: Vmo, ) -> QueryResponseFut<RamdiskControllerCreateFromVmoResult, DefaultFuchsiaResourceDialect>
Initializes a new Ramdisk instance from a VMO. Uses a block size of PAGE_SIZE
,
and derives the block count from the size of the VMO.
Sourcepub fn create_from_vmo_with_params(
&self,
vmo: Vmo,
block_size: u64,
type_guid: Option<&Guid>,
) -> QueryResponseFut<RamdiskControllerCreateFromVmoWithParamsResult, DefaultFuchsiaResourceDialect>
pub fn create_from_vmo_with_params( &self, vmo: Vmo, block_size: u64, type_guid: Option<&Guid>, ) -> QueryResponseFut<RamdiskControllerCreateFromVmoWithParamsResult, DefaultFuchsiaResourceDialect>
Same as CreateFromVmo, but with the given block_size
and optional type_guid
. If
block_size
is zero, PAGE_SIZE
will be used as block_size
.
Trait Implementations§
Source§impl Clone for RamdiskControllerProxy
impl Clone for RamdiskControllerProxy
Source§fn clone(&self) -> RamdiskControllerProxy
fn clone(&self) -> RamdiskControllerProxy
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RamdiskControllerProxy
impl Debug for RamdiskControllerProxy
Source§impl Proxy for RamdiskControllerProxy
impl Proxy for RamdiskControllerProxy
Source§type Protocol = RamdiskControllerMarker
type Protocol = RamdiskControllerMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
Source§impl RamdiskControllerProxyInterface for RamdiskControllerProxy
impl RamdiskControllerProxyInterface for RamdiskControllerProxy
type CreateResponseFut = QueryResponseFut<Result<Option<String>, i32>>
type CreateFromVmoResponseFut = QueryResponseFut<Result<Option<String>, i32>>
type CreateFromVmoWithParamsResponseFut = QueryResponseFut<Result<Option<String>, i32>>
fn create( &self, block_size: u64, block_count: u64, type_guid: Option<&Guid>, ) -> Self::CreateResponseFut
fn create_from_vmo(&self, vmo: Vmo) -> Self::CreateFromVmoResponseFut
fn create_from_vmo_with_params( &self, vmo: Vmo, block_size: u64, type_guid: Option<&Guid>, ) -> Self::CreateFromVmoWithParamsResponseFut
Auto Trait Implementations§
impl Freeze for RamdiskControllerProxy
impl !RefUnwindSafe for RamdiskControllerProxy
impl Send for RamdiskControllerProxy
impl Sync for RamdiskControllerProxy
impl Unpin for RamdiskControllerProxy
impl !UnwindSafe for RamdiskControllerProxy
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ProxyHasClient for Twhere
T: Proxy,
impl<T> ProxyHasClient for Twhere
T: Proxy,
§fn client(&self) -> Result<ZirconClient, Infallible>
fn client(&self) -> Result<ZirconClient, Infallible>
Get a “client” for this proxy. This is just an object which has methods
for a few common handle creation operations.