pub enum StreamClosureReason {
Show 16 variants
Misc,
ResolveFailed,
ConnectRefused,
ExitPolicy,
Destroy,
Done,
Timeout,
NoRoute,
Hibernating,
Internal,
ResourceLimit,
ConnReset,
TorProtocol,
NotDirectory,
End,
PrivateAddr,
}Expand description
Reason that a stream is being closed or failed to be established.
Provides detailed information about why a stream ended.
§Example
use stem_rs::StreamClosureReason;
let reason = StreamClosureReason::Done;
println!("Closure reason: {}", reason); // Prints "DONE"Variants§
Misc
None of the other reasons apply.
ResolveFailed
Unable to resolve the hostname.
ConnectRefused
Remote host refused the connection.
ExitPolicy
OR refuses to connect due to exit policy.
Destroy
Circuit is being shut down.
Done
Connection has been closed normally.
Timeout
Connection timed out.
NoRoute
Routing error while contacting the destination.
Hibernating
Relay is temporarily hibernating.
Internal
Internal error at the relay.
ResourceLimit
Relay has insufficient resources.
ConnReset
Connection was unexpectedly reset.
TorProtocol
Violation in the Tor protocol.
NotDirectory
Directory info requested from non-directory relay.
End
Endpoint has sent a RELAY_END cell.
PrivateAddr
Endpoint was a private address (127.0.0.1, 10.0.0.1, etc).
Trait Implementations§
Source§impl Clone for StreamClosureReason
impl Clone for StreamClosureReason
Source§fn clone(&self) -> StreamClosureReason
fn clone(&self) -> StreamClosureReason
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 Debug for StreamClosureReason
impl Debug for StreamClosureReason
Source§impl Display for StreamClosureReason
impl Display for StreamClosureReason
Source§impl Hash for StreamClosureReason
impl Hash for StreamClosureReason
Source§impl PartialEq for StreamClosureReason
impl PartialEq for StreamClosureReason
impl Copy for StreamClosureReason
impl Eq for StreamClosureReason
impl StructuralPartialEq for StreamClosureReason
Auto Trait Implementations§
impl Freeze for StreamClosureReason
impl RefUnwindSafe for StreamClosureReason
impl Send for StreamClosureReason
impl Sync for StreamClosureReason
impl Unpin for StreamClosureReason
impl UnwindSafe for StreamClosureReason
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