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