pub struct PrimarySynchronousProxy { /* private fields */ }

Implementations§

source§

impl PrimarySynchronousProxy

source

pub fn new(channel: Channel) -> Self

source

pub fn into_channel(self) -> Channel

source

pub fn wait_for_event(&self, deadline: Time) -> Result<PrimaryEvent, Error>

Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.

source

pub fn import_object2( &self, object: Handle, object_type: ObjectType, object_id: u64 ) -> Result<(), Error>

source

pub fn import_object( &self, payload: PrimaryImportObjectRequest ) -> Result<(), Error>

Imports an object for use in the system driver.

source

pub fn release_object( &self, object_id: u64, object_type: ObjectType ) -> Result<(), Error>

Destroys the object with object_id within this connection.

source

pub fn create_context(&self, context_id: u32) -> Result<(), Error>

Creates context context_id for use in command execution. A context may be associated with hardware state.

source

pub fn destroy_context(&self, context_id: u32) -> Result<(), Error>

Destroys context context_id.

source

pub fn execute_command( &self, context_id: u32, resources: &[BufferRange], command_buffers: &[CommandBuffer], wait_semaphores: &[u64], signal_semaphores: &[u64], flags: CommandBufferFlags ) -> Result<(), Error>

Submits command buffers for execution on the hardware, with associated resources. resources must refer to buffers that have been imported. wait_semaphores and signal_semaphores must refer to events that have been imported. wait_semaphores must all be signaled before execution begins, then are reset. signal_semaphores will be signaled after the command buffer is completed.

source

pub fn execute_immediate_commands( &self, context_id: u32, command_data: &[u8], semaphores: &[u64] ) -> Result<(), Error>

Submits a series of commands for execution on the hardware without using a command buffer. semaphores must refer to events that have been imported, and will be signaled after the commands are completed.

source

pub fn execute_inline_commands( &self, context_id: u32, commands: &[InlineCommand] ) -> Result<(), Error>

Submits a series of commands for execution on the hardware without using a command buffer. The number of commands sent should be calculated so that the total message size is less than MAX_INLINE_COMMANDS_DATA_SIZE.

source

pub fn flush(&self, ___deadline: Time) -> Result<(), Error>

Incurs a round-trip to the system driver, used to ensure all previous messages have been observed, but not necessarily completed.

source

pub fn map_buffer(&self, payload: &PrimaryMapBufferRequest) -> Result<(), Error>

Maps a page range onto the hardware in the connection’s address space at address hw_va. flags is a set of flags from MapFlags that specify how the hardware can access the buffer.

source

pub fn unmap_buffer( &self, payload: &PrimaryUnmapBufferRequest ) -> Result<(), Error>

Releases the mapping at address hw_va from the hardware for the given buffer_id. Buffers will also be implicitly unmapped when released.

source

pub fn buffer_range_op2( &self, op: BufferOp, range: &BufferRange ) -> Result<(), Error>

Perform an operation on a range of the buffer.

source

pub fn enable_flow_control(&self) -> Result<(), Error>

Enables the events OnNotifyMessagesConsumed and OnNotifyMemoryImported.

source

pub fn enable_performance_counter_access( &self, access_token: Event ) -> Result<(), Error>

Tries to enable performance counter FIDL messages. To be successful, |access_token| must have been returned by PerformanceCounterAccess.GetPerformanceCountToken() from the matching device.

source

pub fn is_performance_counter_access_allowed( &self, ___deadline: Time ) -> Result<bool, Error>

Returns true if any EnablePerformanceCounterAccess message has succeeded.

source

pub fn enable_performance_counters(&self, counters: &[u64]) -> Result<(), Error>

Enables a set of performance counters. Disables enabled performance counters that are not in the new set. Performance counters will also be automatically disabled on connection close. Performance counter access must have been enabled using EnablePerformanceCounterAccess before calling this method.

source

pub fn create_performance_counter_buffer_pool( &self, pool_id: u64, event_channel: ServerEnd<PerformanceCounterEventsMarker> ) -> Result<(), Error>

Creates a pool of buffers that performance counters can be dumped into. Performance counter access must have been enabled using EnablePerformanceCounterAccess before calling this method.

source

pub fn release_performance_counter_buffer_pool( &self, pool_id: u64 ) -> Result<(), Error>

Releases a pool of performance counter buffers. Performance counter access must have been enabled using EnablePerformanceCounterAccess before calling this method.

source

pub fn add_performance_counter_buffer_offsets_to_pool( &self, pool_id: u64, offsets: &[BufferRange] ) -> Result<(), Error>

Adds a set of offsets into buffers to the pool. |offsets[n].buffer_id| is the id of a buffer that was previously imported using ImportBuffer(). The same buffer may be added to multiple pools. The pool will hold on to a reference to the buffer even after ReleaseBuffer is called. When dumped into this entry, counters will be written starting at |offsets[n].buffer_offset| bytes into the buffer, and up to |offsets[n].buffer_offset| + |offsets[n].buffer_size|. |offsets[n].buffer_size| must be large enough to fit all enabled counters. Performance counter access must have been enabled using EnablePerformanceCounterAccess before calling this method.

source

pub fn remove_performance_counter_buffer_from_pool( &self, pool_id: u64, buffer_id: u64 ) -> Result<(), Error>

Removes every offset of a buffer from the pool. Once this method is finished being handled on the server, no more dumps will be processed into this buffer. In-flight dumps into this buffer may be lost. Performance counter access must have been enabled using EnablePerformanceCounterAccess before calling this method.

source

pub fn dump_performance_counters( &self, pool_id: u64, trigger_id: u32 ) -> Result<(), Error>

Triggers dumping of the performance counters into a buffer pool. May fail silently if there are no buffers in the pool. |trigger_id| is an arbitrary ID assigned by the client that can be returned in OnPerformanceCounterReadCompleted. Performance counter access must have been enabled using EnablePerformanceCounterAccess before calling this method.

source

pub fn clear_performance_counters(&self, counters: &[u64]) -> Result<(), Error>

Sets the values of all listed performance counters to 0. May not be supported by some hardware. Performance counter access must have been enabled using EnablePerformanceCounterAccess before calling this method.

Trait Implementations§

source§

impl Debug for PrimarySynchronousProxy

source§

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

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

impl SynchronousProxy for PrimarySynchronousProxy

§

type Proxy = PrimaryProxy

The async proxy for the same protocol.
§

type Protocol = PrimaryMarker

The protocol which this Proxy controls.
source§

fn from_channel(inner: Channel) -> Self

Create a proxy over the given channel.
source§

fn into_channel(self) -> Channel

Convert the proxy back into a channel.
source§

fn as_channel(&self) -> &Channel

Get a reference to the proxy’s underlying channel. Read more

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
§

impl<T> Encode<Ambiguous1> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T> Encode<Ambiguous2> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

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

§

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

§

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

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more