pub struct FakeBti(/* private fields */);Expand description
A fake BTI object which can be created without having access to hardware resources.
Implementations§
Source§impl FakeBti
impl FakeBti
Sourcepub fn phys_addr() -> usize
pub fn phys_addr() -> usize
All physical addresses returned by zx_bti_pin with a fake BTI will be set to this value.
Sourcepub fn set_paddrs(&self, paddrs: &[zx_paddr_t])
pub fn set_paddrs(&self, paddrs: &[zx_paddr_t])
Sets the paddrs used by the fake BTI. Whenever zx::Bti::pin is called, these static
paddrs will be written out into the resulting array. If more physical addresses are needed
than are available in paddrs, pin will return an error.
Methods from Deref<Target = Bti>§
Sourcepub fn raw_handle(&self) -> u32
pub fn raw_handle(&self) -> u32
Return the handle’s integer value.
pub fn is_invalid(&self) -> bool
Sourcepub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
Returns a HandleRef referring to this handle.
Sourcepub fn duplicate(&self, rights: Rights) -> Result<Bti, Status>
pub fn duplicate(&self, rights: Rights) -> Result<Bti, Status>
Wraps the
zx_handle_duplicate
syscall.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn koid(&self) -> Result<Koid, Status>
pub fn koid(&self) -> Result<Koid, Status>
Returns the [Koid] for the object referred to by this handle.
Sourcepub fn info(&self) -> Result<BtiInfo, Status>
pub fn info(&self) -> Result<BtiInfo, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_BTI topic.