Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/squeue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ impl Entry {
self.0.user_data
}

/// Get the opcode associated with this entry.
#[inline]
pub fn get_opcode(&self) -> u32 {
self.0.opcode.into()
}

/// Set the personality of this event. You can obtain a personality using
/// [`Submitter::register_personality`](crate::Submitter::register_personality).
pub fn personality(mut self, personality: u16) -> Entry {
Expand Down Expand Up @@ -397,6 +403,12 @@ impl Entry128 {
self.0 .0.personality = personality;
self
}

/// Get the opcode associated with this entry.
#[inline]
pub fn get_opcode(&self) -> u32 {
self.0 .0.opcode.into()
}
}

impl private::Sealed for Entry128 {}
Expand Down
Loading