pub struct Event { /* private fields */ }Expand description
Exact completion point for work submitted to an OA engine.
Dropping an event never waits. The originating engine’s retirement service keeps submitted resources and their Vulkan device alive through completion.
Implementations§
Source§impl Event
impl Event
Sourcepub fn is_complete(&self) -> Result<bool>
pub fn is_complete(&self) -> Result<bool>
Return whether this exact submission point has completed.
§Errors
Returns an error when retirement or replayed decode has failed, or when Vulkan cannot query the originating timeline.
Sourcepub fn wait(&self) -> Result<()>
pub fn wait(&self) -> Result<()>
Wait until this exact submission point completes and its submitted command buffer has been retired on the host.
§Errors
Returns an error when the exact timeline wait, submission retirement, or any replayed video decode fails.
Sourcepub fn encoded_packets(&self) -> Result<Vec<EncodedVideoPacket>>
pub fn encoded_packets(&self) -> Result<Vec<EncodedVideoPacket>>
Materialize every encoded packet captured by this event’s plan.
The event waits for completion first, so returned packets are guaranteed complete feedback plus a readable bitstream. Plans without recorded encode nodes return an empty list.
§Errors
Returns an error when the wait fails, feedback did not complete, or a packet cannot be read back from its slot.
Sourcepub fn try_device_duration(&self) -> Result<Option<Duration>>
pub fn try_device_duration(&self) -> Result<Option<Duration>>
Return the complete device duration without waiting.
Returns Ok(None) while this event is incomplete.
§Errors
Returns an error when this event was not produced by a timed submission, completion cannot be queried, or Vulkan timestamp readback fails.
Sourcepub fn device_duration(&self) -> Result<Duration>
pub fn device_duration(&self) -> Result<Duration>
Wait for this event and return its complete device duration.
§Errors
Returns an error when this event was not produced by a timed submission, completion waiting fails, or Vulkan timestamp readback fails.