pub enum PrimaryRequest {
Show 22 variants ImportObject2 { object: Handle, object_type: ObjectType, object_id: u64, control_handle: PrimaryControlHandle, }, ImportObject { payload: PrimaryImportObjectRequest, control_handle: PrimaryControlHandle, }, ReleaseObject { object_id: u64, object_type: ObjectType, control_handle: PrimaryControlHandle, }, CreateContext { context_id: u32, control_handle: PrimaryControlHandle, }, DestroyContext { context_id: u32, control_handle: PrimaryControlHandle, }, ExecuteCommand { context_id: u32, resources: Vec<BufferRange>, command_buffers: Vec<CommandBuffer>, wait_semaphores: Vec<u64>, signal_semaphores: Vec<u64>, flags: CommandBufferFlags, control_handle: PrimaryControlHandle, }, ExecuteImmediateCommands { context_id: u32, command_data: Vec<u8>, semaphores: Vec<u64>, control_handle: PrimaryControlHandle, }, ExecuteInlineCommands { context_id: u32, commands: Vec<InlineCommand>, control_handle: PrimaryControlHandle, }, Flush { responder: PrimaryFlushResponder, }, MapBuffer { payload: PrimaryMapBufferRequest, control_handle: PrimaryControlHandle, }, UnmapBuffer { payload: PrimaryUnmapBufferRequest, control_handle: PrimaryControlHandle, }, BufferRangeOp2 { op: BufferOp, range: BufferRange, control_handle: PrimaryControlHandle, }, EnableFlowControl { control_handle: PrimaryControlHandle, }, EnablePerformanceCounterAccess { access_token: Event, control_handle: PrimaryControlHandle, }, IsPerformanceCounterAccessAllowed { responder: PrimaryIsPerformanceCounterAccessAllowedResponder, }, EnablePerformanceCounters { counters: Vec<u64>, control_handle: PrimaryControlHandle, }, CreatePerformanceCounterBufferPool { pool_id: u64, event_channel: ServerEnd<PerformanceCounterEventsMarker>, control_handle: PrimaryControlHandle, }, ReleasePerformanceCounterBufferPool { pool_id: u64, control_handle: PrimaryControlHandle, }, AddPerformanceCounterBufferOffsetsToPool { pool_id: u64, offsets: Vec<BufferRange>, control_handle: PrimaryControlHandle, }, RemovePerformanceCounterBufferFromPool { pool_id: u64, buffer_id: u64, control_handle: PrimaryControlHandle, }, DumpPerformanceCounters { pool_id: u64, trigger_id: u32, control_handle: PrimaryControlHandle, }, ClearPerformanceCounters { counters: Vec<u64>, control_handle: PrimaryControlHandle, },
}
Expand description

If a system driver error occurs, or if the client sends a message that the client should have known is invalid, the connection will be closed and a zx.Status sent via epitaph.

Variants§

§

ImportObject2

Fields

§object: Handle
§object_type: ObjectType
§object_id: u64
§control_handle: PrimaryControlHandle
§

ImportObject

Imports an object for use in the system driver.

§

ReleaseObject

Destroys the object with object_id within this connection.

Fields

§object_id: u64
§object_type: ObjectType
§control_handle: PrimaryControlHandle
§

CreateContext

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

Fields

§context_id: u32
§control_handle: PrimaryControlHandle
§

DestroyContext

Destroys context context_id.

Fields

§context_id: u32
§control_handle: PrimaryControlHandle
§

ExecuteCommand

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.

Fields

§context_id: u32
§resources: Vec<BufferRange>
§command_buffers: Vec<CommandBuffer>
§wait_semaphores: Vec<u64>
§signal_semaphores: Vec<u64>
§control_handle: PrimaryControlHandle
§

ExecuteImmediateCommands

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.

Fields

§context_id: u32
§command_data: Vec<u8>
§semaphores: Vec<u64>
§control_handle: PrimaryControlHandle
§

ExecuteInlineCommands

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.

Fields

§context_id: u32
§commands: Vec<InlineCommand>
§control_handle: PrimaryControlHandle
§

Flush

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

Fields

§

MapBuffer

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.

§

UnmapBuffer

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

§

BufferRangeOp2

Perform an operation on a range of the buffer.

Fields

§control_handle: PrimaryControlHandle
§

EnableFlowControl

Enables the events OnNotifyMessagesConsumed and OnNotifyMemoryImported.

Fields

§control_handle: PrimaryControlHandle
§

EnablePerformanceCounterAccess

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

Fields

§access_token: Event
§control_handle: PrimaryControlHandle
§

IsPerformanceCounterAccessAllowed

Returns true if any EnablePerformanceCounterAccess message has succeeded.

§

EnablePerformanceCounters

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.

Fields

§counters: Vec<u64>
§control_handle: PrimaryControlHandle
§

CreatePerformanceCounterBufferPool

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.

Fields

§pool_id: u64
§event_channel: ServerEnd<PerformanceCounterEventsMarker>
§control_handle: PrimaryControlHandle
§

ReleasePerformanceCounterBufferPool

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

Fields

§pool_id: u64
§control_handle: PrimaryControlHandle
§

AddPerformanceCounterBufferOffsetsToPool

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.

Fields

§pool_id: u64
§offsets: Vec<BufferRange>
§control_handle: PrimaryControlHandle
§

RemovePerformanceCounterBufferFromPool

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.

Fields

§pool_id: u64
§buffer_id: u64
§control_handle: PrimaryControlHandle
§

DumpPerformanceCounters

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.

Fields

§pool_id: u64
§trigger_id: u32
§control_handle: PrimaryControlHandle
§

ClearPerformanceCounters

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.

Fields

§counters: Vec<u64>
§control_handle: PrimaryControlHandle

Implementations§

source§

impl PrimaryRequest

source

pub fn into_import_object2( self ) -> Option<(Handle, ObjectType, u64, PrimaryControlHandle)>

source

pub fn into_import_object( self ) -> Option<(PrimaryImportObjectRequest, PrimaryControlHandle)>

source

pub fn into_release_object( self ) -> Option<(u64, ObjectType, PrimaryControlHandle)>

source

pub fn into_create_context(self) -> Option<(u32, PrimaryControlHandle)>

source

pub fn into_destroy_context(self) -> Option<(u32, PrimaryControlHandle)>

source

pub fn into_execute_command( self ) -> Option<(u32, Vec<BufferRange>, Vec<CommandBuffer>, Vec<u64>, Vec<u64>, CommandBufferFlags, PrimaryControlHandle)>

source

pub fn into_execute_immediate_commands( self ) -> Option<(u32, Vec<u8>, Vec<u64>, PrimaryControlHandle)>

source

pub fn into_execute_inline_commands( self ) -> Option<(u32, Vec<InlineCommand>, PrimaryControlHandle)>

source

pub fn into_flush(self) -> Option<PrimaryFlushResponder>

source

pub fn into_map_buffer( self ) -> Option<(PrimaryMapBufferRequest, PrimaryControlHandle)>

source

pub fn into_unmap_buffer( self ) -> Option<(PrimaryUnmapBufferRequest, PrimaryControlHandle)>

source

pub fn into_buffer_range_op2( self ) -> Option<(BufferOp, BufferRange, PrimaryControlHandle)>

source

pub fn into_enable_flow_control(self) -> Option<PrimaryControlHandle>

source

pub fn into_enable_performance_counter_access( self ) -> Option<(Event, PrimaryControlHandle)>

source

pub fn into_is_performance_counter_access_allowed( self ) -> Option<PrimaryIsPerformanceCounterAccessAllowedResponder>

source

pub fn into_enable_performance_counters( self ) -> Option<(Vec<u64>, PrimaryControlHandle)>

source

pub fn into_create_performance_counter_buffer_pool( self ) -> Option<(u64, ServerEnd<PerformanceCounterEventsMarker>, PrimaryControlHandle)>

source

pub fn into_release_performance_counter_buffer_pool( self ) -> Option<(u64, PrimaryControlHandle)>

source

pub fn into_add_performance_counter_buffer_offsets_to_pool( self ) -> Option<(u64, Vec<BufferRange>, PrimaryControlHandle)>

source

pub fn into_remove_performance_counter_buffer_from_pool( self ) -> Option<(u64, u64, PrimaryControlHandle)>

source

pub fn into_dump_performance_counters( self ) -> Option<(u64, u32, PrimaryControlHandle)>

source

pub fn into_clear_performance_counters( self ) -> Option<(Vec<u64>, PrimaryControlHandle)>

source

pub fn method_name(&self) -> &'static str

Name of the method defined in FIDL

Trait Implementations§

source§

impl Debug for PrimaryRequest

source§

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

Formats the value using the given formatter. 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