pub enum ProtocolError<T = Infallible> {
LibraryError(InternalError),
InvalidLoginError,
SerializationError,
SizeError {
name: &'static str,
len: usize,
actual_len: usize,
},
ReflectedValueError,
Custom(T),
}Expand description
Represents an error in protocol handling
Variants§
LibraryError(InternalError)
Internal error encountered
InvalidLoginError
Error in validating credentials
SerializationError
Error with serializing / deserializing protocol messages
SizeError
Invalid length for name: expected len, but is actually actual_len.
ReflectedValueError
This error occurs when the client detects that the server has reflected the OPRF value (beta == alpha)
Custom(T)
Custom SecretKey error type
Implementations§
Source§impl ProtocolError
impl ProtocolError
Sourcepub fn into_custom<T>(self) -> ProtocolError<T>
pub fn into_custom<T>(self) -> ProtocolError<T>
Convert ProtocolError<Infallible> into ProtocolError<T>
Trait Implementations§
Source§impl<T: Clone> Clone for ProtocolError<T>
impl<T: Clone> Clone for ProtocolError<T>
Source§fn clone(&self) -> ProtocolError<T>
fn clone(&self) -> ProtocolError<T>
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<T: Debug> Debug for ProtocolError<T>
impl<T: Debug> Debug for ProtocolError<T>
Source§impl<T> Display for ProtocolError<T>where
T: Display,
impl<T> Display for ProtocolError<T>where
T: Display,
Source§impl<T: Error> Error for ProtocolError<T>
impl<T: Error> Error for ProtocolError<T>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for ProtocolError
impl From<Error> for ProtocolError
Source§impl<T> From<Infallible> for ProtocolError<T>
impl<T> From<Infallible> for ProtocolError<T>
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<InternalError> for ProtocolError
impl From<InternalError> for ProtocolError
Source§fn from(voprf_error: InternalError) -> Self
fn from(voprf_error: InternalError) -> Self
Converts to this type from the input type.
Source§impl<T> From<InternalError> for ProtocolError<T>
impl<T> From<InternalError> for ProtocolError<T>
Source§fn from(e: InternalError) -> ProtocolError<T>
fn from(e: InternalError) -> ProtocolError<T>
Converts to this type from the input type.
Source§impl<T: Hash> Hash for ProtocolError<T>
impl<T: Hash> Hash for ProtocolError<T>
Source§impl<T: Ord> Ord for ProtocolError<T>
impl<T: Ord> Ord for ProtocolError<T>
Source§fn cmp(&self, other: &ProtocolError<T>) -> Ordering
fn cmp(&self, other: &ProtocolError<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for ProtocolError<T>
impl<T: PartialEq> PartialEq for ProtocolError<T>
Source§impl<T: PartialOrd> PartialOrd for ProtocolError<T>
impl<T: PartialOrd> PartialOrd for ProtocolError<T>
impl<T: Copy> Copy for ProtocolError<T>
impl<T: Eq> Eq for ProtocolError<T>
impl<T> StructuralPartialEq for ProtocolError<T>
Auto Trait Implementations§
impl<T> Freeze for ProtocolError<T>where
T: Freeze,
impl<T> RefUnwindSafe for ProtocolError<T>where
T: RefUnwindSafe,
impl<T> Send for ProtocolError<T>where
T: Send,
impl<T> Sync for ProtocolError<T>where
T: Sync,
impl<T> Unpin for ProtocolError<T>where
T: Unpin,
impl<T> UnwindSafe for ProtocolError<T>where
T: UnwindSafe,
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