pub enum Error {
BadRequest(BadRequestReason),
Internal(InternalErrorKind),
ConnectionReset,
}Expand description
Error while interacting with the netstack.
Variants§
BadRequest(BadRequestReason)
The request contained invalid parameters. Retrying will not resolve this issue.
Common causes for this error are that a specified address was invalid, there is not enough memory available in the current configuration to complete the request, or the packet to be sent was too large for the socket’s buffer capacity.
Internal(InternalErrorKind)
An internal error occurred.
These errors are either unrecoverable, due to a bug in our code, or caused by a rare and intermittent issue.
ConnectionReset
A TCP connection was reset.
These errors can often be handled by retrying.
Implementations§
Source§impl Error
impl Error
Sourcepub fn wrong_type() -> Error
pub fn wrong_type() -> Error
Error constructor for the wrong type of command response.
Sourcepub fn invalid_socket_state() -> Error
pub fn invalid_socket_state() -> Error
Error constructor for an invalid socket state.
Sourcepub fn missing_listener() -> Error
pub fn missing_listener() -> Error
Error constructor for a missing TCP listener.
Sourcepub fn missing_socket() -> Error
pub fn missing_socket() -> Error
Error constructor for a missing socket.
Sourcepub fn big_packet() -> Error
pub fn big_packet() -> Error
Error constructor for an over-size packet.
Sourcepub fn buffer_full() -> Error
pub fn buffer_full() -> Error
Error constructor for out-of-memory (likely in a specific component, rather than a system OOM).
Sourcepub fn unaddressable() -> Error
pub fn unaddressable() -> Error
Error constructor for an unaddressable packet.
Sourcepub fn zero_buffer() -> Error
pub fn zero_buffer() -> Error
Error constructor for a zero-sized buffer.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ChannelClosedError> for Error
impl From<ChannelClosedError> for Error
Source§fn from(_: ChannelClosedError) -> Error
fn from(_: ChannelClosedError) -> Error
Source§impl From<ConnectError> for Error
impl From<ConnectError> for Error
Source§fn from(value: ConnectError) -> Error
fn from(value: ConnectError) -> Error
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(value: NetstackError) -> Self
fn from(value: NetstackError) -> Self
Source§impl From<ListenError> for Error
impl From<ListenError> for Error
Source§fn from(value: ListenError) -> Error
fn from(value: ListenError) -> Error
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DisplayExt for Twhere
T: Display,
impl<T> DisplayExt for Twhere
T: Display,
Source§fn as_display_debug(&self) -> DisplayToDebug<'_>
fn as_display_debug(&self) -> DisplayToDebug<'_>
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<A, T> DynMessage<A> for T
impl<A, T> DynMessage<A> for T
Source§fn handle_dyn<'a>(
self: Box<T>,
state: &'a mut A,
actor_ref: ActorRef<A>,
tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>,
stop: &'a mut bool,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
fn handle_dyn<'a>( self: Box<T>, state: &'a mut A, actor_ref: ActorRef<A>, tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>, stop: &'a mut bool, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more