Skip to main content

FakeBti

Struct FakeBti 

Source
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

Source

pub fn phys_addr() -> usize

All physical addresses returned by zx_bti_pin with a fake BTI will be set to this value.

Source

pub fn create() -> Result<Self, Status>

Creates a new FakeBti.

Source

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>§

Source

pub fn raw_handle(&self) -> u32

Return the handle’s integer value.

Source

pub fn is_invalid(&self) -> bool

Source

pub fn unowned(&self) -> Unowned<'_, Bti>

Returns an [Unowned] referring to this handle.

Source

pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>

Returns a HandleRef referring to this handle.

Source

pub fn duplicate(&self, rights: Rights) -> Result<Bti, Status>

Wraps the zx_handle_duplicate syscall.

Source

pub fn signal( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>

Wraps the zx_object_signal syscall.

Source

pub fn wait_one( &self, signals: Signals, deadline: Instant<MonotonicTimeline>, ) -> WaitResult

Wraps the zx_object_wait_one syscall.

Source

pub fn wait_async( &self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts, ) -> Result<(), Status>

Wraps the zx_object_wait_async syscall.

Source

pub fn get_name(&self) -> Result<Name, Status>

Wraps a call to the zx_object_get_property syscall for the ZX_PROP_NAME property.

Source

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.

Source

pub fn basic_info(&self) -> Result<HandleBasicInfo, Status>

Wraps the zx_object_get_info syscall for the ZX_INFO_HANDLE_BASIC topic.

Source

pub fn count_info(&self) -> Result<HandleCountInfo, Status>

Wraps the zx_object_get_info syscall for the ZX_INFO_HANDLE_COUNT topic.

Source

pub fn koid(&self) -> Result<Koid, Status>

Returns the [Koid] for the object referred to by this handle.

Source

pub fn info(&self) -> Result<BtiInfo, Status>

Wraps the zx_object_get_info syscall for the ZX_INFO_BTI topic.

Source

pub fn pin( &self, options: BtiOptions, vmo: &Vmo, offset: u64, size: u64, out_paddrs: &mut [usize], ) -> Result<Pmt, Status>

Trait Implementations§

Source§

impl Debug for FakeBti

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for FakeBti

Source§

type Target = Bti

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.