Skip to main content

GenericQueuePair

Enum GenericQueuePair 

Source
pub enum GenericQueuePair {
    Basic(BasicQueuePair),
    Extended(ExtendedQueuePair),
}
Expand description

A unified interface for BasicQueuePair and ExtendedQueuePair, implemented with enum dispatching.

Variants§

§

Basic(BasicQueuePair)

Variant for a Basic Queue Pair

§

Extended(ExtendedQueuePair)

Variant for an Extended Queue Pair

Trait Implementations§

Source§

impl Debug for GenericQueuePair

Source§

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

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

impl From<BasicQueuePair> for GenericQueuePair

Source§

fn from(qp: BasicQueuePair) -> Self

Converts a BasicQueuePair into a GenericQueuePair.

This allows for easy creation of a GenericQueuePair from a BasicQueuePair.

§Examples
let basic_qp = builder.build().unwarp();
let generic_qp: GenericQueuePair = basic_qp.into();
Source§

impl From<ExtendedQueuePair> for GenericQueuePair

Source§

fn from(qp: ExtendedQueuePair) -> Self

Converts an ExtendedQueuePair into a GenericQueuePair.

This allows for easy creation of a GenericQueuePair from an ExtendedQueuePair.

§Examples
let extended_qp = builder.build_ex().unwarp();
let generic_qp: GenericQueuePair = extended_qp.into();
Source§

impl QueuePair for GenericQueuePair

Source§

type Guard<'g> = GenericPostSendGuard<'g> where Self: 'g

Source§

unsafe fn qp(&self) -> NonNull<ibv_qp>

Safety Read more
Source§

fn qp_number(&self) -> u32

Get the QueuePair’s number.
Source§

fn modify( &mut self, attr: &QueuePairAttribute, ) -> Result<(), ModifyQueuePairError>

Modify the QueuePair’s attributes. Read more
Source§

fn start_post_recv(&mut self) -> PostRecvGuard<'_>

Starts a post receive operation, every QueuePair should hold only one PostRecvGuard at the same time. Read more
Source§

fn start_post_send(&mut self) -> Self::Guard<'_>

Starts a post send operation, every QueuePair should hold only one PostSendGuard at the same time. Read more
Source§

fn query( &self, mask: QueuePairAttributeMask, ) -> Result<(QueuePairAttribute, QueuePairInitAttribute), QueryQueuePairError>

Query the QueuePair’s attributes. Specify the attributes to query by providing a mask.
Source§

fn state(&self) -> QueuePairState

Get the QueuePair’s state.

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