Enum rpc_it::rpc::msg::ResponseError
source · pub enum ResponseError<T> {
Typed(T),
Predefined(PredefinedResponseError),
DecodeError(DecodeError),
}Variants§
Implementations§
source§impl<T> ResponseError<T>
impl<T> ResponseError<T>
sourcepub fn as_typed_mut(&mut self) -> Option<&mut T>
pub fn as_typed_mut(&mut self) -> Option<&mut T>
Optionally returns mutable references to the inner fields if this is a ResponseError::Typed, otherwise None
sourcepub fn as_typed(&self) -> Option<&T>
pub fn as_typed(&self) -> Option<&T>
Optionally returns references to the inner fields if this is a ResponseError::Typed, otherwise None
sourcepub fn into_typed(self) -> Result<T, Self>
pub fn into_typed(self) -> Result<T, Self>
Returns the inner fields if this is a ResponseError::Typed, otherwise returns back the enum in the Err case of the result
sourcepub fn is_predefined(&self) -> bool
pub fn is_predefined(&self) -> bool
Returns true if this is a ResponseError::Predefined, otherwise false
sourcepub fn as_predefined_mut(&mut self) -> Option<&mut PredefinedResponseError>
pub fn as_predefined_mut(&mut self) -> Option<&mut PredefinedResponseError>
Optionally returns mutable references to the inner fields if this is a ResponseError::Predefined, otherwise None
sourcepub fn as_predefined(&self) -> Option<&PredefinedResponseError>
pub fn as_predefined(&self) -> Option<&PredefinedResponseError>
Optionally returns references to the inner fields if this is a ResponseError::Predefined, otherwise None
sourcepub fn into_predefined(self) -> Result<PredefinedResponseError, Self>
pub fn into_predefined(self) -> Result<PredefinedResponseError, Self>
Returns the inner fields if this is a ResponseError::Predefined, otherwise returns back the enum in the Err case of the result
sourcepub fn is_decode_error(&self) -> bool
pub fn is_decode_error(&self) -> bool
Returns true if this is a ResponseError::DecodeError, otherwise false
sourcepub fn as_decode_error_mut(&mut self) -> Option<&mut DecodeError>
pub fn as_decode_error_mut(&mut self) -> Option<&mut DecodeError>
Optionally returns mutable references to the inner fields if this is a ResponseError::DecodeError, otherwise None
sourcepub fn as_decode_error(&self) -> Option<&DecodeError>
pub fn as_decode_error(&self) -> Option<&DecodeError>
Optionally returns references to the inner fields if this is a ResponseError::DecodeError, otherwise None
sourcepub fn into_decode_error(self) -> Result<DecodeError, Self>
pub fn into_decode_error(self) -> Result<DecodeError, Self>
Returns the inner fields if this is a ResponseError::DecodeError, otherwise returns back the enum in the Err case of the result