Enum routing::Response
[−]
[src]
pub enum Response { GetSuccess(Data, MessageId), PutSuccess(DataIdentifier, MessageId), PostSuccess(DataIdentifier, MessageId), DeleteSuccess(DataIdentifier, MessageId), AppendSuccess(DataIdentifier, MessageId), GetAccountInfoSuccess { id: MessageId, data_stored: u64, space_available: u64, }, GetFailure { id: MessageId, data_id: DataIdentifier, external_error_indicator: Vec<u8>, }, PutFailure { id: MessageId, data_id: DataIdentifier, external_error_indicator: Vec<u8>, }, PostFailure { id: MessageId, data_id: DataIdentifier, external_error_indicator: Vec<u8>, }, DeleteFailure { id: MessageId, data_id: DataIdentifier, external_error_indicator: Vec<u8>, }, AppendFailure { id: MessageId, data_id: DataIdentifier, external_error_indicator: Vec<u8>, }, GetAccountInfoFailure { id: MessageId, external_error_indicator: Vec<u8>, }, }
Response message types
Variants
GetSuccess(Data, MessageId)
Reply with the requested data (may not be ignored)
Sent from a ManagedNode
to an NaeManager
, and from there to a Client
, although this
may be shortcut if the data is in a node's cache.
PutSuccess(DataIdentifier, MessageId)
Success token for Put (may be ignored)
PostSuccess(DataIdentifier, MessageId)
Success token for Post (may be ignored)
DeleteSuccess(DataIdentifier, MessageId)
Success token for delete (may be ignored)
AppendSuccess(DataIdentifier, MessageId)
Success token for append (may be ignored)
GetAccountInfoSuccess
Response containing account information for requested Client account
Fields
id: MessageId | Unique message identifier |
data_stored: u64 | Amount of data stored on the network by this Client |
space_available: u64 | Amount of network space available to this Client |
GetFailure
Error for Get
, includes signed request to prevent injection attacks
Fields
id: MessageId | Unique message identifier |
data_id: DataIdentifier | ID of the affected data chunk |
external_error_indicator: Vec<u8> | Error type sent back, may be injected from upper layers |
PutFailure
Error for Put, includes signed request to prevent injection attacks
Fields
id: MessageId | Unique message identifier |
data_id: DataIdentifier | ID of the affected data chunk |
external_error_indicator: Vec<u8> | Error type sent back, may be injected from upper layers |
PostFailure
Error for Post, includes signed request to prevent injection attacks
Fields
id: MessageId | Unique message identifier |
data_id: DataIdentifier | ID of the affected data chunk |
external_error_indicator: Vec<u8> | Error type sent back, may be injected from upper layers |
DeleteFailure
Error for delete, includes signed request to prevent injection attacks
Fields
id: MessageId | Unique message identifier |
data_id: DataIdentifier | ID of the affected data chunk |
external_error_indicator: Vec<u8> | Error type sent back, may be injected from upper layers |
AppendFailure
Error for append, includes signed request to prevent injection attacks
Fields
id: MessageId | Unique message identifier |
data_id: DataIdentifier | ID of the affected data chunk |
external_error_indicator: Vec<u8> | Error type sent back, may be injected from upper layers |
GetAccountInfoFailure
Error for GetAccountInfo
Fields
id: MessageId | Unique message identifier |
external_error_indicator: Vec<u8> | Error type sent back, may be injected from upper layers |
Methods
impl Response
[src]
fn priority(&self) -> u8
The priority Crust should send this message with.
fn is_cacheable(&self) -> bool
Is this response cacheable?
Trait Implementations
impl Ord for Response
[src]
fn cmp(&self, __arg_0: &Response) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialOrd for Response
[src]
fn partial_cmp(&self, __arg_0: &Response) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Response) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Response) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Response) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Response) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for Response
[src]
impl PartialEq for Response
[src]
fn eq(&self, __arg_0: &Response) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Response) -> bool
This method tests for !=
.
impl Clone for Response
[src]
fn clone(&self) -> Response
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Hash for Response
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.