pub struct MpiResponse {
pub response_type: i32,
pub tensor_name: String,
pub error_message: String,
}
Expand description
An MPIResponse is a message sent from the coordinator (rank zero) to a rank greater than zero, informing the rank of an operation should be performed now. If the operation requested would result in an error (for example, due to a type or shape mismatch), then the MPIResponse can contain an error and an error message instead. Finally, an MPIResponse can be a DONE message (if there are no more tensors to reduce on this tick of the background loop) or SHUTDOWN if all MPI processes should shut down.
Fields§
§response_type: i32
Empty if the type is DONE or SHUTDOWN.
tensor_name: String
§error_message: String
Empty unless response_type is ERROR.
Implementations§
Source§impl MpiResponse
impl MpiResponse
Sourcepub fn response_type(&self) -> ResponseType
pub fn response_type(&self) -> ResponseType
Returns the enum value of response_type
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_response_type(&mut self, value: ResponseType)
pub fn set_response_type(&mut self, value: ResponseType)
Sets response_type
to the provided enum value.
Trait Implementations§
Source§impl Clone for MpiResponse
impl Clone for MpiResponse
Source§fn clone(&self) -> MpiResponse
fn clone(&self) -> MpiResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MpiResponse
impl Debug for MpiResponse
Source§impl Default for MpiResponse
impl Default for MpiResponse
Source§impl Message for MpiResponse
impl Message for MpiResponse
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl PartialEq for MpiResponse
impl PartialEq for MpiResponse
impl StructuralPartialEq for MpiResponse
Auto Trait Implementations§
impl Freeze for MpiResponse
impl RefUnwindSafe for MpiResponse
impl Send for MpiResponse
impl Sync for MpiResponse
impl Unpin for MpiResponse
impl UnwindSafe for MpiResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more