Struct Pager
pub struct Pager(/* private fields */);Expand description
An object representing a Zircon pager.
As essentially a subtype of NullableHandle, it can be freely interconverted.
Implementations§
§impl Pager
impl Pager
pub fn raw_handle(&self) -> u32
pub fn raw_handle(&self) -> u32
Return the handle’s integer value.
pub fn invalid() -> Pager
pub fn is_invalid(&self) -> bool
pub fn into_raw(self) -> u32
pub fn into_raw(self) -> u32
Return the raw handle’s integer value without closing it when self is dropped.
pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
Returns a [HandleRef] referring to this handle.
pub fn duplicate_handle(&self, rights: Rights) -> Result<Pager, Status>
pub fn duplicate_handle(&self, rights: Rights) -> Result<Pager, Status>
Wraps the
zx_handle_duplicate
syscall.
pub fn replace_handle(self, rights: Rights) -> Result<Pager, Status>
pub fn replace_handle(self, rights: Rights) -> Result<Pager, Status>
Wraps the
zx_handle_replace
syscall.
pub fn into_handle(self) -> NullableHandle
pub fn into_handle(self) -> NullableHandle
Converts the value into its inner handle.
pub fn signal(
&self,
clear_mask: Signals,
set_mask: Signals,
) -> Result<(), Status>
pub fn signal( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>
Wraps the
zx_object_signal
syscall.
pub fn wait_one(
&self,
signals: Signals,
deadline: Instant<MonotonicTimeline>,
) -> WaitResult
pub fn wait_one( &self, signals: Signals, deadline: Instant<MonotonicTimeline>, ) -> WaitResult
Wraps the
zx_object_wait_one
syscall.
pub fn wait_async(
&self,
port: &Port,
key: u64,
signals: Signals,
options: WaitAsyncOpts,
) -> Result<(), Status>
pub fn wait_async( &self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts, ) -> Result<(), Status>
Wraps the
zx_object_wait_async
syscall.
pub fn wait_item(&self, signals: Signals) -> WaitItem<'_>
pub fn wait_item(&self, signals: Signals) -> WaitItem<'_>
Return a WaitItem for this handle and the provided signals to use with
object_wait_many.
pub fn get_name(&self) -> Result<Name, Status>
pub fn get_name(&self) -> Result<Name, Status>
Wraps a call to the
zx_object_get_property
syscall for the ZX_PROP_NAME property.
pub fn set_name(&self, name: &Name) -> Result<(), Status>
pub fn set_name(&self, name: &Name) -> Result<(), Status>
Wraps a call to the
zx_object_set_property
syscall for the ZX_PROP_NAME property.
pub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
pub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_BASIC topic.
pub fn count_info(&self) -> Result<HandleCountInfo, Status>
pub fn count_info(&self) -> Result<HandleCountInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_COUNT topic.
§impl Pager
impl Pager
pub fn create(options: PagerOptions) -> Result<Pager, Status>
pub fn create(options: PagerOptions) -> Result<Pager, Status>
See zx_pager_create
pub fn create_vmo(
&self,
options: VmoOptions,
port: &Port,
key: u64,
size: u64,
) -> Result<Vmo, Status>
pub fn create_vmo( &self, options: VmoOptions, port: &Port, key: u64, size: u64, ) -> Result<Vmo, Status>
pub fn detach_vmo(&self, vmo: &Vmo) -> Result<(), Status>
pub fn detach_vmo(&self, vmo: &Vmo) -> Result<(), Status>
Trait Implementations§
§impl AsHandleRef for Pager
impl AsHandleRef for Pager
§fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
object_wait_many.Source§impl<E> Encode<Pager, E> for Pagerwhere
E: HandleEncoder + ?Sized,
impl<E> Encode<Pager, E> for Pagerwhere
E: HandleEncoder + ?Sized,
Source§fn encode(
self,
encoder: &mut E,
out: &mut MaybeUninit<Pager>,
constraint: <Pager as Constrained>::Constraint,
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut E, out: &mut MaybeUninit<Pager>, constraint: <Pager as Constrained>::Constraint, ) -> Result<(), EncodeError>
Source§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<E> EncodeOption<OptionalPager, E> for Pagerwhere
E: HandleEncoder + ?Sized,
impl<E> EncodeOption<OptionalPager, E> for Pagerwhere
E: HandleEncoder + ?Sized,
Source§fn encode_option(
this: Option<Pager>,
encoder: &mut E,
out: &mut MaybeUninit<OptionalPager>,
constraint: (),
) -> Result<(), EncodeError>
fn encode_option( this: Option<Pager>, encoder: &mut E, out: &mut MaybeUninit<OptionalPager>, constraint: (), ) -> Result<(), EncodeError>
§impl From<NullableHandle> for Pager
impl From<NullableHandle> for Pager
§fn from(handle: NullableHandle) -> Pager
fn from(handle: NullableHandle) -> Pager
§impl From<Pager> for NullableHandle
impl From<Pager> for NullableHandle
§fn from(x: Pager) -> NullableHandle
fn from(x: Pager) -> NullableHandle
Source§impl FromWire<Pager> for Pager
impl FromWire<Pager> for Pager
Source§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl FromWireOption<OptionalPager> for Pager
impl FromWireOption<OptionalPager> for Pager
Source§fn from_wire_option(wire: OptionalPager) -> Option<Pager>
fn from_wire_option(wire: OptionalPager) -> Option<Pager>
§impl Ord for Pager
impl Ord for Pager
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialOrd for Pager
impl PartialOrd for Pager
impl Eq for Pager
impl StructuralPartialEq for Pager
Auto Trait Implementations§
impl Freeze for Pager
impl RefUnwindSafe for Pager
impl Send for Pager
impl Sync for Pager
impl Unpin for Pager
impl UnsafeUnpin for Pager
impl UnwindSafe for Pager
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
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>
Source§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
Source§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to Self