Struct Worker

Source
pub struct Worker { /* private fields */ }
Expand description

An object representing the communication context.

Implementations§

Source§

impl Worker

Source

pub async fn tag_recv( &self, tag: u64, buf: &mut [MaybeUninit<u8>], ) -> Result<usize, Error>

Receives a message with tag.

Source

pub async fn tag_recv_mask( &self, tag: u64, tag_mask: u64, buf: &mut [MaybeUninit<u8>], ) -> Result<(u64, usize), Error>

Receives a message with tag and tag_mask.

Source

pub async fn tag_recv_vectored( &self, tag: u64, iov: &mut [IoSliceMut<'_>], ) -> Result<usize, Error>

Like tag_recv, except that it reads into a slice of buffers.

Source§

impl Worker

Source

pub async fn polling(self: Rc<Self>)

Make progress on the worker.

Source

pub fn print_to_stderr(&self)

Prints information about the worker.

Including protocols being used, thresholds, UCT transport methods, and other useful information associated with the worker.

Source

pub fn thread_mode(&self) -> ucs_thread_mode_t

Thread safe level of the context.

Source

pub fn address(&self) -> Result<WorkerAddress<'_>, Error>

Get the address of the worker object.

This address can be passed to remote instances of the UCP library in order to connect to this worker.

Source

pub fn create_listener( self: &Rc<Self>, addr: SocketAddr, ) -> Result<Listener, Error>

Create a new Listener.

Source

pub fn connect_addr( self: &Rc<Self>, addr: &WorkerAddress<'_>, ) -> Result<Endpoint, Error>

Connect to a remote worker by address.

Source

pub async fn connect_socket( self: &Rc<Self>, addr: SocketAddr, ) -> Result<Endpoint, Error>

Connect to a remote listener.

Source

pub async fn accept( self: &Rc<Self>, connection: ConnectionRequest, ) -> Result<Endpoint, Error>

Accept a connection request.

Source

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

Waits (blocking) until an event has happened.

Source

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

This needs to be called before waiting on each notification on this worker.

Returns ‘true’ if one can wait for events (sleep mode).

Source

pub fn progress(&self) -> u32

Explicitly progresses all communication operations on a worker.

Source

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

Returns a valid file descriptor for polling functions.

Source

pub fn flush(&self)

This routine flushes all outstanding AMO and RMA communications on the worker.

Trait Implementations§

Source§

impl AsRawFd for Worker

Source§

fn as_raw_fd(&self) -> i32

Extracts the raw file descriptor. Read more
Source§

impl Debug for Worker

Source§

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

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

impl Drop for Worker

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Worker

§

impl RefUnwindSafe for Worker

§

impl !Send for Worker

§

impl !Sync for Worker

§

impl Unpin for Worker

§

impl UnwindSafe for Worker

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.