Struct mpi::request::Request [] [src]

#[must_use]
pub struct Request<'a, S: Scope<'a>> { /* fields omitted */ }

A request object for a non-blocking operation registered with a Scope of lifetime 'a

The Scope is needed to ensure that all buffers associated request will outlive the request itself, even if the destructor of the request fails to run.

Panics

Panics if the request object is dropped. To prevent this, call wait, wait_without_status, or test. Alternatively, wrap the request inside a WaitGuard or CancelGuard.

Examples

See examples/immediate.rs

Standard section(s)

3.7.1

Methods

impl<'a, S: Scope<'a>> Request<'a, S>
[src]

[src]

Construct a request object from the raw MPI type.

Requirements

  • The request is a valid, active request. It must not be MPI_REQUEST_NULL.
  • The request must not be persistent.
  • All buffers associated with the request must outlive 'a.
  • The request must not be registered with the given scope.

[src]

Unregister the request object from its scope and deconstruct it into its raw parts.

This is unsafe because the request may outlive its associated buffers.

[src]

Wait for an operation to finish.

Will block execution of the calling thread until the associated operation has finished.

Examples

See examples/immediate.rs

Standard section(s)

3.7.3

[src]

Wait for an operation to finish, but don’t bother retrieving the Status information.

Will block execution of the calling thread until the associated operation has finished.

Standard section(s)

3.7.3

[src]

Test whether an operation has finished.

If the operation has finished, Status is returned. Otherwise returns the unfinished Request.

Examples

See examples/immediate.rs

Standard section(s)

3.7.3

[src]

Initiate cancellation of the request.

The MPI implementation is not guaranteed to fulfill this operation. It may not even be valid for certain types of requests. In the future, the MPI forum may deprecate cancellation of sends entirely.

Examples

See examples/immediate.rs

Standard section(s)

3.8.4

[src]

Reduce the scope of a request.

Trait Implementations

impl<'a, S: Debug + Scope<'a>> Debug for Request<'a, S>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a, S: Scope<'a>> AsRaw for Request<'a, S>
[src]

The raw MPI C API type

[src]

The raw value

impl<'a, S: Scope<'a>> Drop for Request<'a, S>
[src]

[src]

Executes the destructor for this type. Read more

impl<'a, S: Scope<'a>> From<WaitGuard<'a, S>> for Request<'a, S>
[src]

[src]

Performs the conversion.

impl<'a, S: Scope<'a>> From<Request<'a, S>> for WaitGuard<'a, S>
[src]

[src]

Performs the conversion.

impl<'a, S: Scope<'a>> From<Request<'a, S>> for CancelGuard<'a, S>
[src]

[src]

Performs the conversion.