pub enum ClosePathError {
+ClosePathError in noq - Rust ClosePathError
pub enum ClosePathError {
MultipathNotNegotiated,
ClosedPath,
LastOpenPath,
@@ -7,8 +7,8 @@
§ClosedPath
The path is already closed or was never opened
§LastOpenPath
Cannot close the last remaining open path via the local API.
Use Connection::close to end the connection instead.
-Trait Implementations§
Source§impl Clone for ClosePathError
impl Clone for ClosePathError
Source§fn clone(&self) -> ClosePathError
fn clone(&self) -> ClosePathError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClosePathError
impl Debug for ClosePathError
Source§impl Display for ClosePathError
impl Display for ClosePathError
Source§impl Error for ClosePathError
impl Error for ClosePathError
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
Source§impl PartialEq for ClosePathError
impl PartialEq for ClosePathError
impl Eq for ClosePathError
impl StructuralPartialEq for ClosePathError
Auto Trait Implementations§
impl Freeze for ClosePathError
impl RefUnwindSafe for ClosePathError
impl Send for ClosePathError
impl Sync for ClosePathError
impl Unpin for ClosePathError
impl UnwindSafe for ClosePathError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ClosePathError
impl Clone for ClosePathError
Source§fn clone(&self) -> ClosePathError
fn clone(&self) -> ClosePathError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClosePathError
impl Debug for ClosePathError
Source§impl Display for ClosePathError
impl Display for ClosePathError
Source§impl Error for ClosePathError
impl Error for ClosePathError
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
Source§impl PartialEq for ClosePathError
impl PartialEq for ClosePathError
impl Eq for ClosePathError
impl StructuralPartialEq for ClosePathError
Auto Trait Implementations§
impl Freeze for ClosePathError
impl RefUnwindSafe for ClosePathError
impl Send for ClosePathError
impl Sync for ClosePathError
impl Unpin for ClosePathError
impl UnwindSafe for ClosePathError
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
diff --git a/pr/619/docs/noq/enum.ConnectionError.html b/pr/619/docs/noq/enum.ConnectionError.html
index 24ddfba5f..54ee1a8b6 100644
--- a/pr/619/docs/noq/enum.ConnectionError.html
+++ b/pr/619/docs/noq/enum.ConnectionError.html
@@ -1,4 +1,4 @@
-ConnectionError in noq - Rust ConnectionError
pub enum ConnectionError {
+ConnectionError in noq - Rust ConnectionError
pub enum ConnectionError {
VersionMismatch,
TransportError(Error),
ConnectionClosed(ConnectionClose),
@@ -20,8 +20,8 @@ and §LocallyClosed
The local application closed the connection
§CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
Source§impl Clone for ConnectionError
Source§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectionError
Source§impl Display for ConnectionError
Source§impl Error for ConnectionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Close> for ConnectionError
Source§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.Source§impl From<CloseReason> for ConnectionError
Source§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for ReadError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ResetError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for StoppedError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for WriteError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<Error> for ConnectionError
Source§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.Source§impl PartialEq for ConnectionError
Source§impl Eq for ConnectionError
Source§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionError
Source§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectionError
Source§impl Display for ConnectionError
Source§impl Error for ConnectionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Close> for ConnectionError
Source§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.Source§impl From<CloseReason> for ConnectionError
Source§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for ReadError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ResetError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for StoppedError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for WriteError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<Error> for ConnectionError
Source§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.Source§impl PartialEq for ConnectionError
Source§impl Eq for ConnectionError
Source§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/enum.PathError.html b/pr/619/docs/noq/enum.PathError.html
index ffb3c02fd..27ef28aa2 100644
--- a/pr/619/docs/noq/enum.PathError.html
+++ b/pr/619/docs/noq/enum.PathError.html
@@ -1,4 +1,4 @@
-PathError in noq - Rust PathError
pub enum PathError {
+PathError in noq - Rust PathError
pub enum PathError {
MultipathNotNegotiated,
ServerSideNotAllowed,
MaxPathIdReached,
@@ -12,8 +12,8 @@
§RemoteCidsExhausted
No remote CIDs available to open a new path
§ValidationFailed
Path could not be validated and will be abandoned
§InvalidRemoteAddress(SocketAddr)
The remote address for the path is not supported by the endpoint
-
Trait Implementations§
Source§impl Error for PathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl Copy for PathError
Source§impl Eq for PathError
Source§impl StructuralPartialEq for PathError
Auto Trait Implementations§
§impl Freeze for PathError
§impl RefUnwindSafe for PathError
§impl Send for PathError
§impl Sync for PathError
§impl Unpin for PathError
§impl UnwindSafe for PathError
Blanket Implementations§
Trait Implementations§
Source§impl Error for PathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl Copy for PathError
Source§impl Eq for PathError
Source§impl StructuralPartialEq for PathError
Auto Trait Implementations§
§impl Freeze for PathError
§impl RefUnwindSafe for PathError
§impl Send for PathError
§impl Sync for PathError
§impl Unpin for PathError
§impl UnwindSafe for PathError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/enum.SendDatagramError.html b/pr/619/docs/noq/enum.SendDatagramError.html
index 9064f2075..ccdd02d4d 100644
--- a/pr/619/docs/noq/enum.SendDatagramError.html
+++ b/pr/619/docs/noq/enum.SendDatagramError.html
@@ -1,4 +1,4 @@
-SendDatagramError in noq - Rust SendDatagramError
pub enum SendDatagramError {
+SendDatagramError in noq - Rust SendDatagramError
pub enum SendDatagramError {
UnsupportedByPeer,
Disabled,
TooLarge,
@@ -10,8 +10,8 @@
Indicates that the path MTU minus overhead or the limit advertised by the peer has been
exceeded.
§ConnectionLost(ConnectionError)
The connection was lost
-
Trait Implementations§
Source§impl Clone for SendDatagramError
Source§fn clone(&self) -> SendDatagramError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for SendDatagramError
Source§impl Display for SendDatagramError
Source§impl Error for SendDatagramError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl PartialEq for SendDatagramError
Source§impl Eq for SendDatagramError
Source§impl StructuralPartialEq for SendDatagramError
Auto Trait Implementations§
§impl !Freeze for SendDatagramError
§impl !RefUnwindSafe for SendDatagramError
§impl Send for SendDatagramError
§impl Sync for SendDatagramError
§impl Unpin for SendDatagramError
§impl !UnwindSafe for SendDatagramError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for SendDatagramError
Source§fn clone(&self) -> SendDatagramError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for SendDatagramError
Source§impl Display for SendDatagramError
Source§impl Error for SendDatagramError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl PartialEq for SendDatagramError
Source§impl Eq for SendDatagramError
Source§impl StructuralPartialEq for SendDatagramError
Auto Trait Implementations§
§impl !Freeze for SendDatagramError
§impl !RefUnwindSafe for SendDatagramError
§impl Send for SendDatagramError
§impl Sync for SendDatagramError
§impl Unpin for SendDatagramError
§impl !UnwindSafe for SendDatagramError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.AcceptBi.html b/pr/619/docs/noq/struct.AcceptBi.html
index 22392f301..e18841308 100644
--- a/pr/619/docs/noq/struct.AcceptBi.html
+++ b/pr/619/docs/noq/struct.AcceptBi.html
@@ -1,6 +1,6 @@
-AcceptBi in noq - Rust AcceptBi
pub struct AcceptBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_bi
-Trait Implementations§
Source§impl Future for AcceptBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptBi<'a>where
+AcceptBi in noq - Rust AcceptBi
pub struct AcceptBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_bi
+Trait Implementations§
Source§impl Future for AcceptBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptBi<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for AcceptBi<'a>
§impl<'a> !RefUnwindSafe for AcceptBi<'a>
§impl<'a> Send for AcceptBi<'a>
§impl<'a> Sync for AcceptBi<'a>
§impl<'a> !UnwindSafe for AcceptBi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.AcceptUni.html b/pr/619/docs/noq/struct.AcceptUni.html
index 5a259a576..03d1f46d4 100644
--- a/pr/619/docs/noq/struct.AcceptUni.html
+++ b/pr/619/docs/noq/struct.AcceptUni.html
@@ -1,6 +1,6 @@
-AcceptUni in noq - Rust AcceptUni
pub struct AcceptUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_uni
-Trait Implementations§
Source§impl Future for AcceptUni<'_>
Source§type Output = Result<RecvStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptUni<'a>where
+AcceptUni in noq - Rust AcceptUni
pub struct AcceptUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_uni
+Trait Implementations§
Source§impl Future for AcceptUni<'_>
Source§type Output = Result<RecvStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptUni<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for AcceptUni<'a>
§impl<'a> !RefUnwindSafe for AcceptUni<'a>
§impl<'a> Send for AcceptUni<'a>
§impl<'a> Sync for AcceptUni<'a>
§impl<'a> !UnwindSafe for AcceptUni<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.AddressDiscovery.html b/pr/619/docs/noq/struct.AddressDiscovery.html
index b14c5a0cd..22a2d8d82 100644
--- a/pr/619/docs/noq/struct.AddressDiscovery.html
+++ b/pr/619/docs/noq/struct.AddressDiscovery.html
@@ -1,7 +1,7 @@
-AddressDiscovery in noq - Rust AddressDiscovery
pub struct AddressDiscovery { /* private fields */ }
Expand description
Stream produced by Path::observed_external_addr
+AddressDiscovery in noq - Rust AddressDiscovery
pub struct AddressDiscovery { /* private fields */ }
Expand description
Stream produced by Path::observed_external_addr
This will always return the external address most recently reported by the remote over this
path. If the extension is not negotiated, this stream will never return.
-Trait Implementations§
Source§impl Stream for AddressDiscovery
Trait Implementations§
Source§impl Stream for AddressDiscovery
Source§type Item = SocketAddr
Values yielded by the stream.Source§fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Self::Item>>
Attempt to pull out the next value of this stream, registering the
diff --git a/pr/619/docs/noq/struct.Connecting.html b/pr/619/docs/noq/struct.Connecting.html
index a8723b1c8..5c1eda8bb 100644
--- a/pr/619/docs/noq/struct.Connecting.html
+++ b/pr/619/docs/noq/struct.Connecting.html
@@ -1,5 +1,5 @@
Connecting in noq - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
the rest of the handshake to complete, at the cost of weakened cryptographic security
@@ -45,9 +45,9 @@ the endpoint is bound to a wildcard address like 0.0.0.0 or :
information. See noq_udp::RecvMeta::dst_ip for a list of
supported platforms when using noq_udp for I/O, which is the default.
Will panic if called after poll has returned Ready.
-Sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP addresses
+Sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP addresses
Will panic if called after poll has returned Ready.
-Trait Implementations§
Source§impl Debug for Connecting
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.Connection.html b/pr/619/docs/noq/struct.Connection.html
index 35e909b72..8c04b9738 100644
--- a/pr/619/docs/noq/struct.Connection.html
+++ b/pr/619/docs/noq/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in noq - Rust Connection
pub struct Connection(/* private fields */);
Expand description
A QUIC connection.
+Connection in noq - Rust Connection
pub struct Connection(/* private fields */);
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle, streams of
incoming streams, and the various stream types) have been dropped, then the connection will be
automatically closed with an error_code of 0 and an empty reason. You can also close the
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet de
application. Connection::close() describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Sourcepub fn weak_handle(&self) -> WeakConnectionHandle
Returns a weak reference to the inner connection struct.
-Implementations§
Source§impl Connection
Sourcepub fn weak_handle(&self) -> WeakConnectionHandle
Returns a weak reference to the inner connection struct.
+Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiate a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the stream is
actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiate a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the stream is
actually used. Calling open_bi() then waiting on the RecvStream without writing
anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accept the next incoming uni-directional stream
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accept the next incoming uni-directional stream
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream
Important Note: The Connection that calls open_bi() must write to its SendStream
before the other Connection is able to accept_bi(). Calling open_bi() then
waiting on the RecvStream without writing anything to SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receive an application datagram
-Sourcepub fn open_path_ensure(
+
Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receive an application datagram
+Sourcepub fn open_path_ensure(
&self,
addr: SocketAddr,
initial_status: PathStatus,
) -> OpenPath ⓘ
Opens a new path if no path exists yet for the remote address.
Otherwise behaves exactly as open_path.
-Sourcepub fn open_path(
&self,
addr: SocketAddr,
initial_status: PathStatus,
@@ -45,34 +45,34 @@ path opens. The P
future, or at a later time. If the failure is immediate OpenPath::path_id will
return None and the future will be ready immediately. If the failure happens
later, a PathEvent will be emitted.
-
Sourcepub fn path_events(&self) -> PathEvents
A stream of PathEvents for all paths in this connection.
+Sourcepub fn path_events(&self) -> PathEvents
A stream of PathEvents for all paths in this connection.
The stream will yield a PathEvent whenever there is a change in the state of any path in this connection.
The events need to be processed immediately, since there isn’t an unbounded buffer for them.
If processing of events lags behind too much, you will get an error of type crate::Lagged indicating
how many events were lost. The stream continues after a lag, delivering the oldest retained message next.
-Sourcepub fn nat_traversal_updates(&self) -> NatTraversalUpdates
A stream of NAT traversal updates for this connection.
+Sourcepub fn nat_traversal_updates(&self) -> NatTraversalUpdates
A stream of NAT traversal updates for this connection.
The events need to be processed immediately, since there isn’t an unbounded buffer for them.
If processing of events lags behind too much, you will get an error of type crate::Lagged indicating
how many events were lost. The stream continues after a lag, delivering the oldest retained message next.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason
Despite the return type’s name, closed connections are often not an error condition at the
application layer. Cases that might be routine include ConnectionError::LocallyClosed
and ConnectionError::ApplicationClosed.
-Sourcepub fn on_closed(&self) -> OnClosed ⓘ
Wait for the connection to be closed without keeping a strong reference to the connection
+Sourcepub fn on_closed(&self) -> OnClosed ⓘ
Wait for the connection to be closed without keeping a strong reference to the connection
Returns a future that resolves, once the connection is closed, to a tuple of
(ConnectionError, ConnectionStats).
Calling Self::closed keeps the connection alive until it is either closed locally via Connection::close
or closed by the remote peer. This function instead does not keep the connection itself alive,
so if all other clones of the connection are dropped, the connection will be closed implicitly even
if there are futures returned from this function still being awaited.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
Whether the connection is closed, and why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
Whether the connection is closed, and why.
The close_reason is always set to Some(ConnectionError) when a socket is
closed; whether it was closed manually by calling Connection::close() or due to
an internal error (such as an idle timeout or the peer closing the
connection).
Note: when the connection is closed, connection.close_reason().is_some() will always be true.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Close the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving
the CONNECTION_CLOSE frame.
@@ -93,7 +93,7 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close() the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub async fn handshake_confirmed(&self) -> Result<(), ConnectionError>
Wait for the handshake to be confirmed.
+Sourcepub async fn handshake_confirmed(&self) -> Result<(), ConnectionError>
Wait for the handshake to be confirmed.
As a server, who must be authenticated by clients,
this happens when the handshake completes
upon receiving a TLS Finished message from the client.
@@ -101,56 +101,44 @@ In return, the server send a HANDSHAKE_DONE frame.
As a client, this happens when receiving a HANDSHAKE_DONE frame.
At this point, the server has either accepted our authentication,
or, if client authentication is not required, accepted our lack of authentication.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmit data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmit data as an unreliable, unordered application datagram
Application datagrams are a low-level primitive. They may be lost or delivered out of order,
and data must both fit inside a single QUIC packet and be smaller than the maximum
dictated by the peer.
Previously queued datagrams which are still unsent may be discarded to make space for this
datagram, in order of oldest to newest.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmit data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmit data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Compute the maximum size of datagrams that may be passed to send_datagram().
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Compute the maximum size of datagrams that may be passed to send_datagram().
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path MTU
estimate. The peer can also enforce an arbitrarily small fixed limit, but if the peer’s
limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer
When greater than zero, calling send_datagram() with a datagram of
at most this size is guaranteed not to cause older datagrams to be dropped.
-Sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address
-If ServerConfig::migration is true, clients may change addresses at will,
-e.g. when switching to a cellular internet connection.
-If multipath is enabled this will return the address of any
-path, and may not be consistent. Prefer Path::remote_address instead.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established
-the connection
-This can be different from the address the endpoint is bound to, in case
-the endpoint is bound to a wildcard address like 0.0.0.0 or ::.
-This will return None for clients, or when the platform does not expose this
-information. See noq_udp::RecvMeta::dst_ip for a list of
-supported platforms when using noq_udp for I/O, which is the default.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time)
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics
-Sourcepub fn path_stats(&self, path_id: PathId) -> Option<PathStats>
Returns path statistics
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time)
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics
+Sourcepub fn path_stats(&self, path_id: PathId) -> Option<PathStats>
Returns path statistics
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for details on
the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection
Peer addresses and connection IDs can change, but this value will remain
fixed for the lifetime of the connection.
-Sourcepub fn force_key_update(&self)
Update traffic keys spontaneously
+Sourcepub fn force_key_update(&self)
Update traffic keys spontaneously
This primarily exists for testing purposes.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -161,17 +149,17 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modify the number of remotely initiated unidirectional streams that may be concurrently open
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modify the number of remotely initiated unidirectional streams that may be concurrently open
No streams may be opened by the peer unless fewer than count are already open. Large
counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_send_window(&self, send_window: u64)
Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modify the number of remotely initiated bidirectional streams that may be concurrently open
+Sourcepub fn set_send_window(&self, send_window: u64)
Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modify the number of remotely initiated bidirectional streams that may be concurrently open
No streams may be opened by the peer unless fewer than count are already open. Large
counts increase both minimum and worst-case memory consumption.
-Sourcepub fn observed_external_addr(&self) -> ObservedExternalAddr
Track changes on our external address as reported by the peer.
-Sourcepub fn is_multipath_enabled(&self) -> bool
Is multipath enabled?
-Sourcepub fn add_nat_traversal_address(
+
Sourcepub fn observed_external_addr(&self) -> ObservedExternalAddr
Track changes on our external address as reported by the peer.
+Sourcepub fn is_multipath_enabled(&self) -> bool
Is multipath enabled?
+Sourcepub fn add_nat_traversal_address(
&self,
address: SocketAddr,
) -> Result<(), Error>
Registers one address at which this endpoint might be reachable
@@ -179,7 +167,7 @@ strong and pseudorandom, and are suitable for use as keying material.
ADD_ADDRESS frames. This allows clients to obtain server address candidates to initiate
NAT traversal attempts. Clients provide their own reachable addresses in REACH_OUT frames
when Self::initiate_nat_traversal_round is called.
-Sourcepub fn remove_nat_traversal_address(
+
Sourcepub fn remove_nat_traversal_address(
&self,
address: SocketAddr,
) -> Result<(), Error>
Removes one or more addresses from the set of addresses at which this endpoint is reachable
@@ -188,18 +176,18 @@ clients in REMOVE_ADDRESS frames. This allows clients to stop using
server address candidates that are no longer valid for NAT traversal.
For clients, removed addresses will no longer be advertised in REACH_OUT frames.
Addresses not present in the set will be silently ignored.
-Sourcepub fn get_local_nat_traversal_addresses(
+
Sourcepub fn get_local_nat_traversal_addresses(
&self,
) -> Result<Vec<SocketAddr>, Error>
Get the current local nat traversal addresses
-Sourcepub fn get_remote_nat_traversal_addresses(
+
Sourcepub fn get_remote_nat_traversal_addresses(
&self,
) -> Result<Vec<SocketAddr>, Error>
Get the currently advertised nat traversal addresses by the server
-Sourcepub fn initiate_nat_traversal_round(&self) -> Result<Vec<SocketAddr>, Error>
Initiates a new nat traversal round
+Sourcepub fn initiate_nat_traversal_round(&self) -> Result<Vec<SocketAddr>, Error>
Initiates a new nat traversal round
A nat traversal round involves advertising the client’s local addresses in REACH_OUT
frames, and initiating probing of the known remote addresses. When a new round is
initiated, the previous one is cancelled, and paths that have not been opened are closed.
Returns the server addresses that are now being probed.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.OnClosed.html b/pr/619/docs/noq/struct.OnClosed.html
index fcc150193..a7bb35c6f 100644
--- a/pr/619/docs/noq/struct.OnClosed.html
+++ b/pr/619/docs/noq/struct.OnClosed.html
@@ -1,6 +1,6 @@
-OnClosed in noq - Rust OnClosed
pub struct OnClosed { /* private fields */ }
Expand description
Future returned by Connection::on_closed
+OnClosed in noq - Rust OnClosed
pub struct OnClosed { /* private fields */ }
Expand description
Future returned by Connection::on_closed
Resolves to a tuple of (ConnectionError, ConnectionStats).
-Trait Implementations§
Source§impl Future for OnClosed
Source§type Output = (ConnectionError, ConnectionStats)
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Future for OnClosed
Source§type Output = (ConnectionError, ConnectionStats)
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for OnClosed
§impl !RefUnwindSafe for OnClosed
§impl Send for OnClosed
§impl Sync for OnClosed
§impl Unpin for OnClosed
§impl !UnwindSafe for OnClosed
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.OpenBi.html b/pr/619/docs/noq/struct.OpenBi.html
index a098d55ad..0debf2eca 100644
--- a/pr/619/docs/noq/struct.OpenBi.html
+++ b/pr/619/docs/noq/struct.OpenBi.html
@@ -1,6 +1,6 @@
-OpenBi in noq - Rust OpenBi
pub struct OpenBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_bi
-Trait Implementations§
Source§impl Future for OpenBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenBi<'a>where
+OpenBi in noq - Rust OpenBi
pub struct OpenBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_bi
+Trait Implementations§
Source§impl Future for OpenBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenBi<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for OpenBi<'a>
§impl<'a> !RefUnwindSafe for OpenBi<'a>
§impl<'a> Send for OpenBi<'a>
§impl<'a> Sync for OpenBi<'a>
§impl<'a> !UnwindSafe for OpenBi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.OpenUni.html b/pr/619/docs/noq/struct.OpenUni.html
index 54f7cedbe..324de9c42 100644
--- a/pr/619/docs/noq/struct.OpenUni.html
+++ b/pr/619/docs/noq/struct.OpenUni.html
@@ -1,6 +1,6 @@
-OpenUni in noq - Rust OpenUni
pub struct OpenUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_uni
-Trait Implementations§
Source§impl Future for OpenUni<'_>
Source§type Output = Result<SendStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenUni<'a>where
+OpenUni in noq - Rust OpenUni
pub struct OpenUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_uni
+Trait Implementations§
Source§impl Future for OpenUni<'_>
Source§type Output = Result<SendStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenUni<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for OpenUni<'a>
§impl<'a> !RefUnwindSafe for OpenUni<'a>
§impl<'a> Send for OpenUni<'a>
§impl<'a> Sync for OpenUni<'a>
§impl<'a> !UnwindSafe for OpenUni<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.Path.html b/pr/619/docs/noq/struct.Path.html
index ace476fdb..93edafae5 100644
--- a/pr/619/docs/noq/struct.Path.html
+++ b/pr/619/docs/noq/struct.Path.html
@@ -1,7 +1,7 @@
-Path in noq - Rust Path
pub struct Path { /* private fields */ }
Expand description
An open network transmission within a multipath-enabled connection.
+Path in noq - Rust Path
pub struct Path { /* private fields */ }
Expand description
An open network transmission within a multipath-enabled connection.
As long as a Path or WeakPathHandle is alive, it is ensured that the
PathStats for this path are not dropped even after the path is abandoned.
-Implementations§
Source§impl Path
Sourcepub fn weak_handle(&self) -> WeakPathHandle
Returns a WeakPathHandle for this path.
+Implementations§
Source§impl Path
Sourcepub fn weak_handle(&self) -> WeakPathHandle
Returns a WeakPathHandle for this path.
Holding a WeakPathHandle does not keep a connection alive, but ensures that the
path’s stats are not dropped until the underlying connection is dropped, even if the
path is abandoned.
@@ -28,8 +28,11 @@ returned.
Sourcepub fn observed_external_addr(&self) -> Result<AddressDiscovery, ClosedPath>
Track changes on our external address as reported by the peer.
If the address-discovery extension is not negotiated, the stream will never return.
Sourcepub fn remote_address(&self) -> Result<SocketAddr, ClosedPath>
The peer’s UDP address for this path.
-Sourcepub fn ping(&self) -> Result<(), ClosedPath>
Ping the remote endpoint over this path.
-Trait Implementations§
Source§impl PartialEq for Path
Source§fn eq(&self, other: &Self) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
+Sourcepub fn local_ip(&self) -> Result<Option<IpAddr>, ClosedPath>
The local IP used for this path, if known.
+Returns Ok(None) for clients or when the platform does not expose this information; see
+noq_udp::RecvMeta::dst_ip for supported platforms.
+Sourcepub fn ping(&self) -> Result<(), ClosedPath>
Ping the remote endpoint over this path.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Path
§impl RefUnwindSafe for Path
§impl Send for Path
§impl Sync for Path
§impl Unpin for Path
§impl UnwindSafe for Path
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.ReadDatagram.html b/pr/619/docs/noq/struct.ReadDatagram.html
index 4ce3655a4..aba7eb3cb 100644
--- a/pr/619/docs/noq/struct.ReadDatagram.html
+++ b/pr/619/docs/noq/struct.ReadDatagram.html
@@ -1,6 +1,6 @@
-ReadDatagram in noq - Rust ReadDatagram
pub struct ReadDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::read_datagram
-Trait Implementations§
Source§impl Future for ReadDatagram<'_>
Source§type Output = Result<Bytes, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for ReadDatagram<'a>where
+ReadDatagram in noq - Rust ReadDatagram
pub struct ReadDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::read_datagram
+Trait Implementations§
Source§impl Future for ReadDatagram<'_>
Source§type Output = Result<Bytes, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for ReadDatagram<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for ReadDatagram<'a>
§impl<'a> !RefUnwindSafe for ReadDatagram<'a>
§impl<'a> Send for ReadDatagram<'a>
§impl<'a> Sync for ReadDatagram<'a>
§impl<'a> !UnwindSafe for ReadDatagram<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.SendDatagram.html b/pr/619/docs/noq/struct.SendDatagram.html
index e29a91ed8..6f0cfcf49 100644
--- a/pr/619/docs/noq/struct.SendDatagram.html
+++ b/pr/619/docs/noq/struct.SendDatagram.html
@@ -1,6 +1,6 @@
-SendDatagram in noq - Rust SendDatagram
pub struct SendDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::send_datagram_wait
-Trait Implementations§
Source§impl Future for SendDatagram<'_>
Source§impl<'__pin, 'a> Unpin for SendDatagram<'a>where
+SendDatagram in noq - Rust SendDatagram
pub struct SendDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::send_datagram_wait
+Trait Implementations§
Source§impl Future for SendDatagram<'_>
Source§impl<'__pin, 'a> Unpin for SendDatagram<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for SendDatagram<'a>
§impl<'a> !RefUnwindSafe for SendDatagram<'a>
§impl<'a> Send for SendDatagram<'a>
§impl<'a> Sync for SendDatagram<'a>
§impl<'a> !UnwindSafe for SendDatagram<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.WeakConnectionHandle.html b/pr/619/docs/noq/struct.WeakConnectionHandle.html
index 6969cb307..3e05c3c97 100644
--- a/pr/619/docs/noq/struct.WeakConnectionHandle.html
+++ b/pr/619/docs/noq/struct.WeakConnectionHandle.html
@@ -1,10 +1,10 @@
-WeakConnectionHandle in noq - Rust WeakConnectionHandle
pub struct WeakConnectionHandle(/* private fields */);
Expand description
A handle to some connection internals, use with care.
+WeakConnectionHandle in noq - Rust WeakConnectionHandle
pub struct WeakConnectionHandle(/* private fields */);
Expand description
A handle to some connection internals, use with care.
This contains a weak reference to the connection so will not itself keep the connection
alive.
-Implementations§
Source§impl WeakConnectionHandle
Sourcepub fn is_alive(&self) -> bool
Returns true if the Connection associated with this handle is still alive.
-Sourcepub fn upgrade(&self) -> Option<Connection>
Upgrade the handle to a full Connection
-Sourcepub fn is_same_connection(&self, other: &Self) -> bool
Returns true if the two WeakConnectionHandle point at the same connection.
-Trait Implementations§
Source§impl Clone for WeakConnectionHandle
Source§fn clone(&self) -> WeakConnectionHandle
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for WeakConnectionHandle
§impl RefUnwindSafe for WeakConnectionHandle
§impl Send for WeakConnectionHandle
§impl Sync for WeakConnectionHandle
§impl Unpin for WeakConnectionHandle
§impl UnwindSafe for WeakConnectionHandle
Blanket Implementations§
Implementations§
Source§impl WeakConnectionHandle
Sourcepub fn is_alive(&self) -> bool
Returns true if the Connection associated with this handle is still alive.
+Sourcepub fn upgrade(&self) -> Option<Connection>
Upgrade the handle to a full Connection
+Sourcepub fn is_same_connection(&self, other: &Self) -> bool
Returns true if the two WeakConnectionHandle point at the same connection.
+Trait Implementations§
Source§impl Clone for WeakConnectionHandle
Source§fn clone(&self) -> WeakConnectionHandle
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for WeakConnectionHandle
§impl RefUnwindSafe for WeakConnectionHandle
§impl Send for WeakConnectionHandle
§impl Sync for WeakConnectionHandle
§impl Unpin for WeakConnectionHandle
§impl UnwindSafe for WeakConnectionHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.WeakPathHandle.html b/pr/619/docs/noq/struct.WeakPathHandle.html
index 967321d0a..9e6d5a2bd 100644
--- a/pr/619/docs/noq/struct.WeakPathHandle.html
+++ b/pr/619/docs/noq/struct.WeakPathHandle.html
@@ -1,12 +1,12 @@
-WeakPathHandle in noq - Rust WeakPathHandle
pub struct WeakPathHandle { /* private fields */ }
Expand description
Weak handle for a Path that does not keep the connection alive.
+WeakPathHandle in noq - Rust WeakPathHandle
pub struct WeakPathHandle { /* private fields */ }
Expand description
Weak handle for a Path that does not keep the connection alive.
As long as a WeakPathHandle for a path exists, that path’s final stats will not be dropped even if
the path was abandoned.
The WeakPathHandle can be upgraded to a Path as long as its Connection has not been dropped.
-Implementations§
Source§impl WeakPathHandle
Implementations§
Trait Implementations§
Source§impl Clone for WeakPathHandle
Source§impl Debug for WeakPathHandle
Source§impl Drop for WeakPathHandle
Source§impl PartialEq for WeakPathHandle
Source§impl Eq for WeakPathHandle
Auto Trait Implementations§
§impl Freeze for WeakPathHandle
§impl RefUnwindSafe for WeakPathHandle
§impl Send for WeakPathHandle
§impl Sync for WeakPathHandle
§impl Unpin for WeakPathHandle
§impl UnwindSafe for WeakPathHandle
Blanket Implementations§
Trait Implementations§
Source§impl Clone for WeakPathHandle
Source§impl Debug for WeakPathHandle
Source§impl Drop for WeakPathHandle
Source§impl PartialEq for WeakPathHandle
Source§impl Eq for WeakPathHandle
Auto Trait Implementations§
§impl Freeze for WeakPathHandle
§impl RefUnwindSafe for WeakPathHandle
§impl Send for WeakPathHandle
§impl Sync for WeakPathHandle
§impl Unpin for WeakPathHandle
§impl UnwindSafe for WeakPathHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.ZeroRttAccepted.html b/pr/619/docs/noq/struct.ZeroRttAccepted.html
index f6332f3cd..d6f96d145 100644
--- a/pr/619/docs/noq/struct.ZeroRttAccepted.html
+++ b/pr/619/docs/noq/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in noq - Rust ZeroRttAccepted
pub struct ZeroRttAccepted(/* private fields */);
Expand description
Future that completes when a connection is fully established
+ZeroRttAccepted in noq - Rust ZeroRttAccepted
pub struct ZeroRttAccepted(/* private fields */);
Expand description
Future that completes when a connection is fully established
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/trait.NetworkChangeHint.html b/pr/619/docs/noq/trait.NetworkChangeHint.html
index 2fb715fa0..63d289ea2 100644
--- a/pr/619/docs/noq/trait.NetworkChangeHint.html
+++ b/pr/619/docs/noq/trait.NetworkChangeHint.html
@@ -1,4 +1,4 @@
-NetworkChangeHint in noq - Rust NetworkChangeHint
pub trait NetworkChangeHint: Debug + 'static {
+NetworkChangeHint in noq - Rust NetworkChangeHint
pub trait NetworkChangeHint: Debug + 'static {
// Required method
fn is_path_recoverable(
&self,
@@ -6,7 +6,7 @@
network_path: FourTuple,
) -> bool;
}
Expand description
Hints when the caller identifies a network change.
-Required Methods§
Sourcefn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool
Inform the connection if a path may recover after a network change.
+Required Methods§
Sourcefn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool
Inform the connection if a path may recover after a network change.
After network changes, paths may not be recoverable. In this case, waiting for the path to
become idle may take longer than what is desirable. If Self::is_path_recoverable
returns false, a multipath-enabled, client-side connection will establish a new path to
diff --git a/pr/619/docs/noq_proto/enum.ClosePathError.html b/pr/619/docs/noq_proto/enum.ClosePathError.html
index d035a5e2d..1b194ffe1 100644
--- a/pr/619/docs/noq_proto/enum.ClosePathError.html
+++ b/pr/619/docs/noq_proto/enum.ClosePathError.html
@@ -1,4 +1,4 @@
-
ClosePathError in noq_proto - Rust ClosePathError
pub enum ClosePathError {
+ClosePathError in noq_proto - Rust ClosePathError
impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/enum.ConnectionError.html b/pr/619/docs/noq/enum.ConnectionError.html
index 24ddfba5f..54ee1a8b6 100644
--- a/pr/619/docs/noq/enum.ConnectionError.html
+++ b/pr/619/docs/noq/enum.ConnectionError.html
@@ -1,4 +1,4 @@
-ConnectionError in noq - Rust ConnectionError
pub enum ConnectionError {
+ConnectionError in noq - Rust ConnectionError
pub enum ConnectionError {
VersionMismatch,
TransportError(Error),
ConnectionClosed(ConnectionClose),
@@ -20,8 +20,8 @@ and §LocallyClosed
The local application closed the connection
§CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
Source§impl Clone for ConnectionError
Source§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectionError
Source§impl Display for ConnectionError
Source§impl Error for ConnectionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Close> for ConnectionError
Source§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.Source§impl From<CloseReason> for ConnectionError
Source§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for ReadError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ResetError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for StoppedError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for WriteError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<Error> for ConnectionError
Source§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.Source§impl PartialEq for ConnectionError
Source§impl Eq for ConnectionError
Source§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionError
Source§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectionError
Source§impl Display for ConnectionError
Source§impl Error for ConnectionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Close> for ConnectionError
Source§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.Source§impl From<CloseReason> for ConnectionError
Source§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for ReadError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ResetError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for StoppedError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for WriteError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<Error> for ConnectionError
Source§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.Source§impl PartialEq for ConnectionError
Source§impl Eq for ConnectionError
Source§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/enum.PathError.html b/pr/619/docs/noq/enum.PathError.html
index ffb3c02fd..27ef28aa2 100644
--- a/pr/619/docs/noq/enum.PathError.html
+++ b/pr/619/docs/noq/enum.PathError.html
@@ -1,4 +1,4 @@
-PathError in noq - Rust PathError
pub enum PathError {
+PathError in noq - Rust PathError
pub enum PathError {
MultipathNotNegotiated,
ServerSideNotAllowed,
MaxPathIdReached,
@@ -12,8 +12,8 @@
§RemoteCidsExhausted
No remote CIDs available to open a new path
§ValidationFailed
Path could not be validated and will be abandoned
§InvalidRemoteAddress(SocketAddr)
The remote address for the path is not supported by the endpoint
-
Trait Implementations§
Source§impl Error for PathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl Copy for PathError
Source§impl Eq for PathError
Source§impl StructuralPartialEq for PathError
Auto Trait Implementations§
§impl Freeze for PathError
§impl RefUnwindSafe for PathError
§impl Send for PathError
§impl Sync for PathError
§impl Unpin for PathError
§impl UnwindSafe for PathError
Blanket Implementations§
Trait Implementations§
Source§impl Error for PathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl Copy for PathError
Source§impl Eq for PathError
Source§impl StructuralPartialEq for PathError
Auto Trait Implementations§
§impl Freeze for PathError
§impl RefUnwindSafe for PathError
§impl Send for PathError
§impl Sync for PathError
§impl Unpin for PathError
§impl UnwindSafe for PathError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/enum.SendDatagramError.html b/pr/619/docs/noq/enum.SendDatagramError.html
index 9064f2075..ccdd02d4d 100644
--- a/pr/619/docs/noq/enum.SendDatagramError.html
+++ b/pr/619/docs/noq/enum.SendDatagramError.html
@@ -1,4 +1,4 @@
-SendDatagramError in noq - Rust SendDatagramError
pub enum SendDatagramError {
+SendDatagramError in noq - Rust SendDatagramError
pub enum SendDatagramError {
UnsupportedByPeer,
Disabled,
TooLarge,
@@ -10,8 +10,8 @@
Indicates that the path MTU minus overhead or the limit advertised by the peer has been
exceeded.
§ConnectionLost(ConnectionError)
The connection was lost
-
Trait Implementations§
Source§impl Clone for SendDatagramError
Source§fn clone(&self) -> SendDatagramError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for SendDatagramError
Source§impl Display for SendDatagramError
Source§impl Error for SendDatagramError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl PartialEq for SendDatagramError
Source§impl Eq for SendDatagramError
Source§impl StructuralPartialEq for SendDatagramError
Auto Trait Implementations§
§impl !Freeze for SendDatagramError
§impl !RefUnwindSafe for SendDatagramError
§impl Send for SendDatagramError
§impl Sync for SendDatagramError
§impl Unpin for SendDatagramError
§impl !UnwindSafe for SendDatagramError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for SendDatagramError
Source§fn clone(&self) -> SendDatagramError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for SendDatagramError
Source§impl Display for SendDatagramError
Source§impl Error for SendDatagramError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl PartialEq for SendDatagramError
Source§impl Eq for SendDatagramError
Source§impl StructuralPartialEq for SendDatagramError
Auto Trait Implementations§
§impl !Freeze for SendDatagramError
§impl !RefUnwindSafe for SendDatagramError
§impl Send for SendDatagramError
§impl Sync for SendDatagramError
§impl Unpin for SendDatagramError
§impl !UnwindSafe for SendDatagramError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.AcceptBi.html b/pr/619/docs/noq/struct.AcceptBi.html
index 22392f301..e18841308 100644
--- a/pr/619/docs/noq/struct.AcceptBi.html
+++ b/pr/619/docs/noq/struct.AcceptBi.html
@@ -1,6 +1,6 @@
-AcceptBi in noq - Rust AcceptBi
pub struct AcceptBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_bi
-Trait Implementations§
Source§impl Future for AcceptBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptBi<'a>where
+AcceptBi in noq - Rust AcceptBi
pub struct AcceptBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_bi
+Trait Implementations§
Source§impl Future for AcceptBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptBi<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for AcceptBi<'a>
§impl<'a> !RefUnwindSafe for AcceptBi<'a>
§impl<'a> Send for AcceptBi<'a>
§impl<'a> Sync for AcceptBi<'a>
§impl<'a> !UnwindSafe for AcceptBi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.AcceptUni.html b/pr/619/docs/noq/struct.AcceptUni.html
index 5a259a576..03d1f46d4 100644
--- a/pr/619/docs/noq/struct.AcceptUni.html
+++ b/pr/619/docs/noq/struct.AcceptUni.html
@@ -1,6 +1,6 @@
-AcceptUni in noq - Rust AcceptUni
pub struct AcceptUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_uni
-Trait Implementations§
Source§impl Future for AcceptUni<'_>
Source§type Output = Result<RecvStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptUni<'a>where
+AcceptUni in noq - Rust AcceptUni
pub struct AcceptUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_uni
+Trait Implementations§
Source§impl Future for AcceptUni<'_>
Source§type Output = Result<RecvStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptUni<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for AcceptUni<'a>
§impl<'a> !RefUnwindSafe for AcceptUni<'a>
§impl<'a> Send for AcceptUni<'a>
§impl<'a> Sync for AcceptUni<'a>
§impl<'a> !UnwindSafe for AcceptUni<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.AddressDiscovery.html b/pr/619/docs/noq/struct.AddressDiscovery.html
index b14c5a0cd..22a2d8d82 100644
--- a/pr/619/docs/noq/struct.AddressDiscovery.html
+++ b/pr/619/docs/noq/struct.AddressDiscovery.html
@@ -1,7 +1,7 @@
-AddressDiscovery in noq - Rust AddressDiscovery
pub struct AddressDiscovery { /* private fields */ }
Expand description
Stream produced by Path::observed_external_addr
+AddressDiscovery in noq - Rust AddressDiscovery
pub struct AddressDiscovery { /* private fields */ }
Expand description
Stream produced by Path::observed_external_addr
This will always return the external address most recently reported by the remote over this
path. If the extension is not negotiated, this stream will never return.
-Trait Implementations§
Source§impl Stream for AddressDiscovery
Trait Implementations§
Source§impl Stream for AddressDiscovery
Source§type Item = SocketAddr
Values yielded by the stream.Source§fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Self::Item>>
Attempt to pull out the next value of this stream, registering the
diff --git a/pr/619/docs/noq/struct.Connecting.html b/pr/619/docs/noq/struct.Connecting.html
index a8723b1c8..5c1eda8bb 100644
--- a/pr/619/docs/noq/struct.Connecting.html
+++ b/pr/619/docs/noq/struct.Connecting.html
@@ -1,5 +1,5 @@
Connecting in noq - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
the rest of the handshake to complete, at the cost of weakened cryptographic security
@@ -45,9 +45,9 @@ the endpoint is bound to a wildcard address like 0.0.0.0 or :
information. See noq_udp::RecvMeta::dst_ip for a list of
supported platforms when using noq_udp for I/O, which is the default.
Will panic if called after poll has returned Ready.
-Sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP addresses
+Sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP addresses
Will panic if called after poll has returned Ready.
-Trait Implementations§
Source§impl Debug for Connecting
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.Connection.html b/pr/619/docs/noq/struct.Connection.html
index 35e909b72..8c04b9738 100644
--- a/pr/619/docs/noq/struct.Connection.html
+++ b/pr/619/docs/noq/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in noq - Rust Connection
pub struct Connection(/* private fields */);
Expand description
A QUIC connection.
+Connection in noq - Rust Connection
pub struct Connection(/* private fields */);
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle, streams of
incoming streams, and the various stream types) have been dropped, then the connection will be
automatically closed with an error_code of 0 and an empty reason. You can also close the
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet de
application. Connection::close() describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Sourcepub fn weak_handle(&self) -> WeakConnectionHandle
Returns a weak reference to the inner connection struct.
-Implementations§
Source§impl Connection
Sourcepub fn weak_handle(&self) -> WeakConnectionHandle
Returns a weak reference to the inner connection struct.
+Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiate a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the stream is
actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiate a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the stream is
actually used. Calling open_bi() then waiting on the RecvStream without writing
anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accept the next incoming uni-directional stream
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accept the next incoming uni-directional stream
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream
Important Note: The Connection that calls open_bi() must write to its SendStream
before the other Connection is able to accept_bi(). Calling open_bi() then
waiting on the RecvStream without writing anything to SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receive an application datagram
-Sourcepub fn open_path_ensure(
+
Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receive an application datagram
+Sourcepub fn open_path_ensure(
&self,
addr: SocketAddr,
initial_status: PathStatus,
) -> OpenPath ⓘ
Opens a new path if no path exists yet for the remote address.
Otherwise behaves exactly as open_path.
-Sourcepub fn open_path(
&self,
addr: SocketAddr,
initial_status: PathStatus,
@@ -45,34 +45,34 @@ path opens. The P
future, or at a later time. If the failure is immediate OpenPath::path_id will
return None and the future will be ready immediately. If the failure happens
later, a PathEvent will be emitted.
-
Sourcepub fn path_events(&self) -> PathEvents
A stream of PathEvents for all paths in this connection.
+Sourcepub fn path_events(&self) -> PathEvents
A stream of PathEvents for all paths in this connection.
The stream will yield a PathEvent whenever there is a change in the state of any path in this connection.
The events need to be processed immediately, since there isn’t an unbounded buffer for them.
If processing of events lags behind too much, you will get an error of type crate::Lagged indicating
how many events were lost. The stream continues after a lag, delivering the oldest retained message next.
-Sourcepub fn nat_traversal_updates(&self) -> NatTraversalUpdates
A stream of NAT traversal updates for this connection.
+Sourcepub fn nat_traversal_updates(&self) -> NatTraversalUpdates
A stream of NAT traversal updates for this connection.
The events need to be processed immediately, since there isn’t an unbounded buffer for them.
If processing of events lags behind too much, you will get an error of type crate::Lagged indicating
how many events were lost. The stream continues after a lag, delivering the oldest retained message next.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason
Despite the return type’s name, closed connections are often not an error condition at the
application layer. Cases that might be routine include ConnectionError::LocallyClosed
and ConnectionError::ApplicationClosed.
-Sourcepub fn on_closed(&self) -> OnClosed ⓘ
Wait for the connection to be closed without keeping a strong reference to the connection
+Sourcepub fn on_closed(&self) -> OnClosed ⓘ
Wait for the connection to be closed without keeping a strong reference to the connection
Returns a future that resolves, once the connection is closed, to a tuple of
(ConnectionError, ConnectionStats).
Calling Self::closed keeps the connection alive until it is either closed locally via Connection::close
or closed by the remote peer. This function instead does not keep the connection itself alive,
so if all other clones of the connection are dropped, the connection will be closed implicitly even
if there are futures returned from this function still being awaited.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
Whether the connection is closed, and why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
Whether the connection is closed, and why.
The close_reason is always set to Some(ConnectionError) when a socket is
closed; whether it was closed manually by calling Connection::close() or due to
an internal error (such as an idle timeout or the peer closing the
connection).
Note: when the connection is closed, connection.close_reason().is_some() will always be true.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Close the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving
the CONNECTION_CLOSE frame.
@@ -93,7 +93,7 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close() the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub async fn handshake_confirmed(&self) -> Result<(), ConnectionError>
Wait for the handshake to be confirmed.
+Sourcepub async fn handshake_confirmed(&self) -> Result<(), ConnectionError>
Wait for the handshake to be confirmed.
As a server, who must be authenticated by clients,
this happens when the handshake completes
upon receiving a TLS Finished message from the client.
@@ -101,56 +101,44 @@ In return, the server send a HANDSHAKE_DONE frame.
As a client, this happens when receiving a HANDSHAKE_DONE frame.
At this point, the server has either accepted our authentication,
or, if client authentication is not required, accepted our lack of authentication.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmit data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmit data as an unreliable, unordered application datagram
Application datagrams are a low-level primitive. They may be lost or delivered out of order,
and data must both fit inside a single QUIC packet and be smaller than the maximum
dictated by the peer.
Previously queued datagrams which are still unsent may be discarded to make space for this
datagram, in order of oldest to newest.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmit data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmit data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Compute the maximum size of datagrams that may be passed to send_datagram().
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Compute the maximum size of datagrams that may be passed to send_datagram().
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path MTU
estimate. The peer can also enforce an arbitrarily small fixed limit, but if the peer’s
limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer
When greater than zero, calling send_datagram() with a datagram of
at most this size is guaranteed not to cause older datagrams to be dropped.
-Sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address
-If ServerConfig::migration is true, clients may change addresses at will,
-e.g. when switching to a cellular internet connection.
-If multipath is enabled this will return the address of any
-path, and may not be consistent. Prefer Path::remote_address instead.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established
-the connection
-This can be different from the address the endpoint is bound to, in case
-the endpoint is bound to a wildcard address like 0.0.0.0 or ::.
-This will return None for clients, or when the platform does not expose this
-information. See noq_udp::RecvMeta::dst_ip for a list of
-supported platforms when using noq_udp for I/O, which is the default.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time)
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics
-Sourcepub fn path_stats(&self, path_id: PathId) -> Option<PathStats>
Returns path statistics
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time)
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics
+Sourcepub fn path_stats(&self, path_id: PathId) -> Option<PathStats>
Returns path statistics
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for details on
the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection
Peer addresses and connection IDs can change, but this value will remain
fixed for the lifetime of the connection.
-Sourcepub fn force_key_update(&self)
Update traffic keys spontaneously
+Sourcepub fn force_key_update(&self)
Update traffic keys spontaneously
This primarily exists for testing purposes.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -161,17 +149,17 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modify the number of remotely initiated unidirectional streams that may be concurrently open
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modify the number of remotely initiated unidirectional streams that may be concurrently open
No streams may be opened by the peer unless fewer than count are already open. Large
counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_send_window(&self, send_window: u64)
Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modify the number of remotely initiated bidirectional streams that may be concurrently open
+Sourcepub fn set_send_window(&self, send_window: u64)
Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modify the number of remotely initiated bidirectional streams that may be concurrently open
No streams may be opened by the peer unless fewer than count are already open. Large
counts increase both minimum and worst-case memory consumption.
-Sourcepub fn observed_external_addr(&self) -> ObservedExternalAddr
Track changes on our external address as reported by the peer.
-Sourcepub fn is_multipath_enabled(&self) -> bool
Is multipath enabled?
-Sourcepub fn add_nat_traversal_address(
+
Sourcepub fn observed_external_addr(&self) -> ObservedExternalAddr
Track changes on our external address as reported by the peer.
+Sourcepub fn is_multipath_enabled(&self) -> bool
Is multipath enabled?
+Sourcepub fn add_nat_traversal_address(
&self,
address: SocketAddr,
) -> Result<(), Error>
Registers one address at which this endpoint might be reachable
@@ -179,7 +167,7 @@ strong and pseudorandom, and are suitable for use as keying material.
ADD_ADDRESS frames. This allows clients to obtain server address candidates to initiate
NAT traversal attempts. Clients provide their own reachable addresses in REACH_OUT frames
when Self::initiate_nat_traversal_round is called.
-Sourcepub fn remove_nat_traversal_address(
+
Sourcepub fn remove_nat_traversal_address(
&self,
address: SocketAddr,
) -> Result<(), Error>
Removes one or more addresses from the set of addresses at which this endpoint is reachable
@@ -188,18 +176,18 @@ clients in REMOVE_ADDRESS frames. This allows clients to stop using
server address candidates that are no longer valid for NAT traversal.
For clients, removed addresses will no longer be advertised in REACH_OUT frames.
Addresses not present in the set will be silently ignored.
-Sourcepub fn get_local_nat_traversal_addresses(
+
Sourcepub fn get_local_nat_traversal_addresses(
&self,
) -> Result<Vec<SocketAddr>, Error>
Get the current local nat traversal addresses
-Sourcepub fn get_remote_nat_traversal_addresses(
+
Sourcepub fn get_remote_nat_traversal_addresses(
&self,
) -> Result<Vec<SocketAddr>, Error>
Get the currently advertised nat traversal addresses by the server
-Sourcepub fn initiate_nat_traversal_round(&self) -> Result<Vec<SocketAddr>, Error>
Initiates a new nat traversal round
+Sourcepub fn initiate_nat_traversal_round(&self) -> Result<Vec<SocketAddr>, Error>
Initiates a new nat traversal round
A nat traversal round involves advertising the client’s local addresses in REACH_OUT
frames, and initiating probing of the known remote addresses. When a new round is
initiated, the previous one is cancelled, and paths that have not been opened are closed.
Returns the server addresses that are now being probed.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.OnClosed.html b/pr/619/docs/noq/struct.OnClosed.html
index fcc150193..a7bb35c6f 100644
--- a/pr/619/docs/noq/struct.OnClosed.html
+++ b/pr/619/docs/noq/struct.OnClosed.html
@@ -1,6 +1,6 @@
-OnClosed in noq - Rust OnClosed
pub struct OnClosed { /* private fields */ }
Expand description
Future returned by Connection::on_closed
+OnClosed in noq - Rust OnClosed
pub struct OnClosed { /* private fields */ }
Expand description
Future returned by Connection::on_closed
Resolves to a tuple of (ConnectionError, ConnectionStats).
-Trait Implementations§
Source§impl Future for OnClosed
Source§type Output = (ConnectionError, ConnectionStats)
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Future for OnClosed
Source§type Output = (ConnectionError, ConnectionStats)
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for OnClosed
§impl !RefUnwindSafe for OnClosed
§impl Send for OnClosed
§impl Sync for OnClosed
§impl Unpin for OnClosed
§impl !UnwindSafe for OnClosed
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.OpenBi.html b/pr/619/docs/noq/struct.OpenBi.html
index a098d55ad..0debf2eca 100644
--- a/pr/619/docs/noq/struct.OpenBi.html
+++ b/pr/619/docs/noq/struct.OpenBi.html
@@ -1,6 +1,6 @@
-OpenBi in noq - Rust OpenBi
pub struct OpenBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_bi
-Trait Implementations§
Source§impl Future for OpenBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenBi<'a>where
+OpenBi in noq - Rust OpenBi
pub struct OpenBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_bi
+Trait Implementations§
Source§impl Future for OpenBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenBi<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for OpenBi<'a>
§impl<'a> !RefUnwindSafe for OpenBi<'a>
§impl<'a> Send for OpenBi<'a>
§impl<'a> Sync for OpenBi<'a>
§impl<'a> !UnwindSafe for OpenBi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.OpenUni.html b/pr/619/docs/noq/struct.OpenUni.html
index 54f7cedbe..324de9c42 100644
--- a/pr/619/docs/noq/struct.OpenUni.html
+++ b/pr/619/docs/noq/struct.OpenUni.html
@@ -1,6 +1,6 @@
-OpenUni in noq - Rust OpenUni
pub struct OpenUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_uni
-Trait Implementations§
Source§impl Future for OpenUni<'_>
Source§type Output = Result<SendStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenUni<'a>where
+OpenUni in noq - Rust OpenUni
pub struct OpenUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_uni
+Trait Implementations§
Source§impl Future for OpenUni<'_>
Source§type Output = Result<SendStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenUni<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for OpenUni<'a>
§impl<'a> !RefUnwindSafe for OpenUni<'a>
§impl<'a> Send for OpenUni<'a>
§impl<'a> Sync for OpenUni<'a>
§impl<'a> !UnwindSafe for OpenUni<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.Path.html b/pr/619/docs/noq/struct.Path.html
index ace476fdb..93edafae5 100644
--- a/pr/619/docs/noq/struct.Path.html
+++ b/pr/619/docs/noq/struct.Path.html
@@ -1,7 +1,7 @@
-Path in noq - Rust Path
pub struct Path { /* private fields */ }
Expand description
An open network transmission within a multipath-enabled connection.
+Path in noq - Rust Path
pub struct Path { /* private fields */ }
Expand description
An open network transmission within a multipath-enabled connection.
As long as a Path or WeakPathHandle is alive, it is ensured that the
PathStats for this path are not dropped even after the path is abandoned.
-Implementations§
Source§impl Path
Sourcepub fn weak_handle(&self) -> WeakPathHandle
Returns a WeakPathHandle for this path.
+Implementations§
Source§impl Path
Sourcepub fn weak_handle(&self) -> WeakPathHandle
Returns a WeakPathHandle for this path.
Holding a WeakPathHandle does not keep a connection alive, but ensures that the
path’s stats are not dropped until the underlying connection is dropped, even if the
path is abandoned.
@@ -28,8 +28,11 @@ returned.
Sourcepub fn observed_external_addr(&self) -> Result<AddressDiscovery, ClosedPath>
Track changes on our external address as reported by the peer.
If the address-discovery extension is not negotiated, the stream will never return.
Sourcepub fn remote_address(&self) -> Result<SocketAddr, ClosedPath>
The peer’s UDP address for this path.
-Sourcepub fn ping(&self) -> Result<(), ClosedPath>
Ping the remote endpoint over this path.
-Trait Implementations§
Source§impl PartialEq for Path
Source§fn eq(&self, other: &Self) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
+Sourcepub fn local_ip(&self) -> Result<Option<IpAddr>, ClosedPath>
The local IP used for this path, if known.
+Returns Ok(None) for clients or when the platform does not expose this information; see
+noq_udp::RecvMeta::dst_ip for supported platforms.
+Sourcepub fn ping(&self) -> Result<(), ClosedPath>
Ping the remote endpoint over this path.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Path
§impl RefUnwindSafe for Path
§impl Send for Path
§impl Sync for Path
§impl Unpin for Path
§impl UnwindSafe for Path
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.ReadDatagram.html b/pr/619/docs/noq/struct.ReadDatagram.html
index 4ce3655a4..aba7eb3cb 100644
--- a/pr/619/docs/noq/struct.ReadDatagram.html
+++ b/pr/619/docs/noq/struct.ReadDatagram.html
@@ -1,6 +1,6 @@
-ReadDatagram in noq - Rust ReadDatagram
pub struct ReadDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::read_datagram
-Trait Implementations§
Source§impl Future for ReadDatagram<'_>
Source§type Output = Result<Bytes, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for ReadDatagram<'a>where
+ReadDatagram in noq - Rust ReadDatagram
pub struct ReadDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::read_datagram
+Trait Implementations§
Source§impl Future for ReadDatagram<'_>
Source§type Output = Result<Bytes, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for ReadDatagram<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for ReadDatagram<'a>
§impl<'a> !RefUnwindSafe for ReadDatagram<'a>
§impl<'a> Send for ReadDatagram<'a>
§impl<'a> Sync for ReadDatagram<'a>
§impl<'a> !UnwindSafe for ReadDatagram<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.SendDatagram.html b/pr/619/docs/noq/struct.SendDatagram.html
index e29a91ed8..6f0cfcf49 100644
--- a/pr/619/docs/noq/struct.SendDatagram.html
+++ b/pr/619/docs/noq/struct.SendDatagram.html
@@ -1,6 +1,6 @@
-SendDatagram in noq - Rust SendDatagram
pub struct SendDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::send_datagram_wait
-Trait Implementations§
Source§impl Future for SendDatagram<'_>
Source§impl<'__pin, 'a> Unpin for SendDatagram<'a>where
+SendDatagram in noq - Rust SendDatagram
pub struct SendDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::send_datagram_wait
+Trait Implementations§
Source§impl Future for SendDatagram<'_>
Source§impl<'__pin, 'a> Unpin for SendDatagram<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for SendDatagram<'a>
§impl<'a> !RefUnwindSafe for SendDatagram<'a>
§impl<'a> Send for SendDatagram<'a>
§impl<'a> Sync for SendDatagram<'a>
§impl<'a> !UnwindSafe for SendDatagram<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.WeakConnectionHandle.html b/pr/619/docs/noq/struct.WeakConnectionHandle.html
index 6969cb307..3e05c3c97 100644
--- a/pr/619/docs/noq/struct.WeakConnectionHandle.html
+++ b/pr/619/docs/noq/struct.WeakConnectionHandle.html
@@ -1,10 +1,10 @@
-WeakConnectionHandle in noq - Rust WeakConnectionHandle
pub struct WeakConnectionHandle(/* private fields */);
Expand description
A handle to some connection internals, use with care.
+WeakConnectionHandle in noq - Rust WeakConnectionHandle
pub struct WeakConnectionHandle(/* private fields */);
Expand description
A handle to some connection internals, use with care.
This contains a weak reference to the connection so will not itself keep the connection
alive.
-Implementations§
Source§impl WeakConnectionHandle
Sourcepub fn is_alive(&self) -> bool
Returns true if the Connection associated with this handle is still alive.
-Sourcepub fn upgrade(&self) -> Option<Connection>
Upgrade the handle to a full Connection
-Sourcepub fn is_same_connection(&self, other: &Self) -> bool
Returns true if the two WeakConnectionHandle point at the same connection.
-Trait Implementations§
Source§impl Clone for WeakConnectionHandle
Source§fn clone(&self) -> WeakConnectionHandle
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for WeakConnectionHandle
§impl RefUnwindSafe for WeakConnectionHandle
§impl Send for WeakConnectionHandle
§impl Sync for WeakConnectionHandle
§impl Unpin for WeakConnectionHandle
§impl UnwindSafe for WeakConnectionHandle
Blanket Implementations§
Implementations§
Source§impl WeakConnectionHandle
Sourcepub fn is_alive(&self) -> bool
Returns true if the Connection associated with this handle is still alive.
+Sourcepub fn upgrade(&self) -> Option<Connection>
Upgrade the handle to a full Connection
+Sourcepub fn is_same_connection(&self, other: &Self) -> bool
Returns true if the two WeakConnectionHandle point at the same connection.
+Trait Implementations§
Source§impl Clone for WeakConnectionHandle
Source§fn clone(&self) -> WeakConnectionHandle
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for WeakConnectionHandle
§impl RefUnwindSafe for WeakConnectionHandle
§impl Send for WeakConnectionHandle
§impl Sync for WeakConnectionHandle
§impl Unpin for WeakConnectionHandle
§impl UnwindSafe for WeakConnectionHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.WeakPathHandle.html b/pr/619/docs/noq/struct.WeakPathHandle.html
index 967321d0a..9e6d5a2bd 100644
--- a/pr/619/docs/noq/struct.WeakPathHandle.html
+++ b/pr/619/docs/noq/struct.WeakPathHandle.html
@@ -1,12 +1,12 @@
-WeakPathHandle in noq - Rust WeakPathHandle
pub struct WeakPathHandle { /* private fields */ }
Expand description
Weak handle for a Path that does not keep the connection alive.
+WeakPathHandle in noq - Rust WeakPathHandle
pub struct WeakPathHandle { /* private fields */ }
Expand description
Weak handle for a Path that does not keep the connection alive.
As long as a WeakPathHandle for a path exists, that path’s final stats will not be dropped even if
the path was abandoned.
The WeakPathHandle can be upgraded to a Path as long as its Connection has not been dropped.
-Implementations§
Source§impl WeakPathHandle
Implementations§
Trait Implementations§
Source§impl Clone for WeakPathHandle
Source§impl Debug for WeakPathHandle
Source§impl Drop for WeakPathHandle
Source§impl PartialEq for WeakPathHandle
Source§impl Eq for WeakPathHandle
Auto Trait Implementations§
§impl Freeze for WeakPathHandle
§impl RefUnwindSafe for WeakPathHandle
§impl Send for WeakPathHandle
§impl Sync for WeakPathHandle
§impl Unpin for WeakPathHandle
§impl UnwindSafe for WeakPathHandle
Blanket Implementations§
Trait Implementations§
Source§impl Clone for WeakPathHandle
Source§impl Debug for WeakPathHandle
Source§impl Drop for WeakPathHandle
Source§impl PartialEq for WeakPathHandle
Source§impl Eq for WeakPathHandle
Auto Trait Implementations§
§impl Freeze for WeakPathHandle
§impl RefUnwindSafe for WeakPathHandle
§impl Send for WeakPathHandle
§impl Sync for WeakPathHandle
§impl Unpin for WeakPathHandle
§impl UnwindSafe for WeakPathHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.ZeroRttAccepted.html b/pr/619/docs/noq/struct.ZeroRttAccepted.html
index f6332f3cd..d6f96d145 100644
--- a/pr/619/docs/noq/struct.ZeroRttAccepted.html
+++ b/pr/619/docs/noq/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in noq - Rust ZeroRttAccepted
pub struct ZeroRttAccepted(/* private fields */);
Expand description
Future that completes when a connection is fully established
+ZeroRttAccepted in noq - Rust ZeroRttAccepted
pub struct ZeroRttAccepted(/* private fields */);
Expand description
Future that completes when a connection is fully established
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/trait.NetworkChangeHint.html b/pr/619/docs/noq/trait.NetworkChangeHint.html
index 2fb715fa0..63d289ea2 100644
--- a/pr/619/docs/noq/trait.NetworkChangeHint.html
+++ b/pr/619/docs/noq/trait.NetworkChangeHint.html
@@ -1,4 +1,4 @@
-NetworkChangeHint in noq - Rust NetworkChangeHint
pub trait NetworkChangeHint: Debug + 'static {
+NetworkChangeHint in noq - Rust NetworkChangeHint
pub trait NetworkChangeHint: Debug + 'static {
// Required method
fn is_path_recoverable(
&self,
@@ -6,7 +6,7 @@
network_path: FourTuple,
) -> bool;
}
Expand description
Hints when the caller identifies a network change.
-Required Methods§
Sourcefn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool
Inform the connection if a path may recover after a network change.
+Required Methods§
Sourcefn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool
Inform the connection if a path may recover after a network change.
After network changes, paths may not be recoverable. In this case, waiting for the path to
become idle may take longer than what is desirable. If Self::is_path_recoverable
returns false, a multipath-enabled, client-side connection will establish a new path to
diff --git a/pr/619/docs/noq_proto/enum.ClosePathError.html b/pr/619/docs/noq_proto/enum.ClosePathError.html
index d035a5e2d..1b194ffe1 100644
--- a/pr/619/docs/noq_proto/enum.ClosePathError.html
+++ b/pr/619/docs/noq_proto/enum.ClosePathError.html
@@ -1,4 +1,4 @@
-
ClosePathError in noq_proto - Rust ClosePathError
pub enum ClosePathError {
+ClosePathError in noq_proto - Rust ClosePathError
ConnectionError
pub enum ConnectionError {
+ConnectionError in noq - Rust ConnectionError
pub enum ConnectionError {
VersionMismatch,
TransportError(Error),
ConnectionClosed(ConnectionClose),
@@ -20,8 +20,8 @@ and §LocallyClosed
The local application closed the connection
§CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
Source§impl Clone for ConnectionError
Source§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectionError
Source§impl Display for ConnectionError
Source§impl Error for ConnectionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Close> for ConnectionError
Source§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.Source§impl From<CloseReason> for ConnectionError
Source§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for ReadError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ResetError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for StoppedError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for WriteError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<Error> for ConnectionError
Source§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.Source§impl PartialEq for ConnectionError
Source§impl Eq for ConnectionError
Source§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionError
Source§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectionError
Source§impl Display for ConnectionError
Source§impl Error for ConnectionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Close> for ConnectionError
Source§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.Source§impl From<CloseReason> for ConnectionError
Source§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for ReadError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ResetError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for StoppedError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for WriteError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<Error> for ConnectionError
Source§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.Source§impl PartialEq for ConnectionError
Source§impl Eq for ConnectionError
Source§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/enum.PathError.html b/pr/619/docs/noq/enum.PathError.html
index ffb3c02fd..27ef28aa2 100644
--- a/pr/619/docs/noq/enum.PathError.html
+++ b/pr/619/docs/noq/enum.PathError.html
@@ -1,4 +1,4 @@
-PathError in noq - Rust PathError
pub enum PathError {
+PathError in noq - Rust PathError
pub enum PathError {
MultipathNotNegotiated,
ServerSideNotAllowed,
MaxPathIdReached,
@@ -12,8 +12,8 @@
§RemoteCidsExhausted
No remote CIDs available to open a new path
§ValidationFailed
Path could not be validated and will be abandoned
§InvalidRemoteAddress(SocketAddr)
The remote address for the path is not supported by the endpoint
-
Trait Implementations§
Source§impl Error for PathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl Copy for PathError
Source§impl Eq for PathError
Source§impl StructuralPartialEq for PathError
Auto Trait Implementations§
§impl Freeze for PathError
§impl RefUnwindSafe for PathError
§impl Send for PathError
§impl Sync for PathError
§impl Unpin for PathError
§impl UnwindSafe for PathError
Blanket Implementations§
Trait Implementations§
Source§impl Error for PathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl Copy for PathError
Source§impl Eq for PathError
Source§impl StructuralPartialEq for PathError
Auto Trait Implementations§
§impl Freeze for PathError
§impl RefUnwindSafe for PathError
§impl Send for PathError
§impl Sync for PathError
§impl Unpin for PathError
§impl UnwindSafe for PathError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/enum.SendDatagramError.html b/pr/619/docs/noq/enum.SendDatagramError.html
index 9064f2075..ccdd02d4d 100644
--- a/pr/619/docs/noq/enum.SendDatagramError.html
+++ b/pr/619/docs/noq/enum.SendDatagramError.html
@@ -1,4 +1,4 @@
-SendDatagramError in noq - Rust SendDatagramError
pub enum SendDatagramError {
+SendDatagramError in noq - Rust SendDatagramError
pub enum SendDatagramError {
UnsupportedByPeer,
Disabled,
TooLarge,
@@ -10,8 +10,8 @@
Indicates that the path MTU minus overhead or the limit advertised by the peer has been
exceeded.
§ConnectionLost(ConnectionError)
The connection was lost
-
Trait Implementations§
Source§impl Clone for SendDatagramError
Source§fn clone(&self) -> SendDatagramError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for SendDatagramError
Source§impl Display for SendDatagramError
Source§impl Error for SendDatagramError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl PartialEq for SendDatagramError
Source§impl Eq for SendDatagramError
Source§impl StructuralPartialEq for SendDatagramError
Auto Trait Implementations§
§impl !Freeze for SendDatagramError
§impl !RefUnwindSafe for SendDatagramError
§impl Send for SendDatagramError
§impl Sync for SendDatagramError
§impl Unpin for SendDatagramError
§impl !UnwindSafe for SendDatagramError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for SendDatagramError
Source§fn clone(&self) -> SendDatagramError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for SendDatagramError
Source§impl Display for SendDatagramError
Source§impl Error for SendDatagramError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ConnectionError> for SendDatagramError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl PartialEq for SendDatagramError
Source§impl Eq for SendDatagramError
Source§impl StructuralPartialEq for SendDatagramError
Auto Trait Implementations§
§impl !Freeze for SendDatagramError
§impl !RefUnwindSafe for SendDatagramError
§impl Send for SendDatagramError
§impl Sync for SendDatagramError
§impl Unpin for SendDatagramError
§impl !UnwindSafe for SendDatagramError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.AcceptBi.html b/pr/619/docs/noq/struct.AcceptBi.html
index 22392f301..e18841308 100644
--- a/pr/619/docs/noq/struct.AcceptBi.html
+++ b/pr/619/docs/noq/struct.AcceptBi.html
@@ -1,6 +1,6 @@
-AcceptBi in noq - Rust AcceptBi
pub struct AcceptBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_bi
-Trait Implementations§
Source§impl Future for AcceptBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptBi<'a>where
+AcceptBi in noq - Rust AcceptBi
pub struct AcceptBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_bi
+Trait Implementations§
Source§impl Future for AcceptBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptBi<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for AcceptBi<'a>
§impl<'a> !RefUnwindSafe for AcceptBi<'a>
§impl<'a> Send for AcceptBi<'a>
§impl<'a> Sync for AcceptBi<'a>
§impl<'a> !UnwindSafe for AcceptBi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.AcceptUni.html b/pr/619/docs/noq/struct.AcceptUni.html
index 5a259a576..03d1f46d4 100644
--- a/pr/619/docs/noq/struct.AcceptUni.html
+++ b/pr/619/docs/noq/struct.AcceptUni.html
@@ -1,6 +1,6 @@
-AcceptUni in noq - Rust AcceptUni
pub struct AcceptUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_uni
-Trait Implementations§
Source§impl Future for AcceptUni<'_>
Source§type Output = Result<RecvStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptUni<'a>where
+AcceptUni in noq - Rust AcceptUni
pub struct AcceptUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::accept_uni
+Trait Implementations§
Source§impl Future for AcceptUni<'_>
Source§type Output = Result<RecvStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for AcceptUni<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for AcceptUni<'a>
§impl<'a> !RefUnwindSafe for AcceptUni<'a>
§impl<'a> Send for AcceptUni<'a>
§impl<'a> Sync for AcceptUni<'a>
§impl<'a> !UnwindSafe for AcceptUni<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.AddressDiscovery.html b/pr/619/docs/noq/struct.AddressDiscovery.html
index b14c5a0cd..22a2d8d82 100644
--- a/pr/619/docs/noq/struct.AddressDiscovery.html
+++ b/pr/619/docs/noq/struct.AddressDiscovery.html
@@ -1,7 +1,7 @@
-AddressDiscovery in noq - Rust AddressDiscovery
pub struct AddressDiscovery { /* private fields */ }
Expand description
Stream produced by Path::observed_external_addr
+AddressDiscovery in noq - Rust AddressDiscovery
pub struct AddressDiscovery { /* private fields */ }
Expand description
Stream produced by Path::observed_external_addr
This will always return the external address most recently reported by the remote over this
path. If the extension is not negotiated, this stream will never return.
-Trait Implementations§
Source§impl Stream for AddressDiscovery
Trait Implementations§
Source§impl Stream for AddressDiscovery
Source§type Item = SocketAddr
Values yielded by the stream.Source§fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Self::Item>>
Attempt to pull out the next value of this stream, registering the
diff --git a/pr/619/docs/noq/struct.Connecting.html b/pr/619/docs/noq/struct.Connecting.html
index a8723b1c8..5c1eda8bb 100644
--- a/pr/619/docs/noq/struct.Connecting.html
+++ b/pr/619/docs/noq/struct.Connecting.html
@@ -1,5 +1,5 @@
Connecting in noq - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
the rest of the handshake to complete, at the cost of weakened cryptographic security
@@ -45,9 +45,9 @@ the endpoint is bound to a wildcard address like 0.0.0.0 or :
information. See noq_udp::RecvMeta::dst_ip for a list of
supported platforms when using noq_udp for I/O, which is the default.
Will panic if called after poll has returned Ready.
-Sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP addresses
+Sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP addresses
Will panic if called after poll has returned Ready.
-Trait Implementations§
Source§impl Debug for Connecting
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.Connection.html b/pr/619/docs/noq/struct.Connection.html
index 35e909b72..8c04b9738 100644
--- a/pr/619/docs/noq/struct.Connection.html
+++ b/pr/619/docs/noq/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in noq - Rust Connection
pub struct Connection(/* private fields */);
Expand description
A QUIC connection.
+Connection in noq - Rust Connection
pub struct Connection(/* private fields */);
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle, streams of
incoming streams, and the various stream types) have been dropped, then the connection will be
automatically closed with an error_code of 0 and an empty reason. You can also close the
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet de
application. Connection::close() describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Sourcepub fn weak_handle(&self) -> WeakConnectionHandle
Returns a weak reference to the inner connection struct.
-Implementations§
Source§impl Connection
Sourcepub fn weak_handle(&self) -> WeakConnectionHandle
Returns a weak reference to the inner connection struct.
+Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiate a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the stream is
actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiate a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the stream is
actually used. Calling open_bi() then waiting on the RecvStream without writing
anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accept the next incoming uni-directional stream
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accept the next incoming uni-directional stream
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream
Important Note: The Connection that calls open_bi() must write to its SendStream
before the other Connection is able to accept_bi(). Calling open_bi() then
waiting on the RecvStream without writing anything to SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receive an application datagram
-Sourcepub fn open_path_ensure(
+
Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receive an application datagram
+Sourcepub fn open_path_ensure(
&self,
addr: SocketAddr,
initial_status: PathStatus,
) -> OpenPath ⓘ
Opens a new path if no path exists yet for the remote address.
Otherwise behaves exactly as open_path.
-Sourcepub fn open_path(
&self,
addr: SocketAddr,
initial_status: PathStatus,
@@ -45,34 +45,34 @@ path opens. The P
future, or at a later time. If the failure is immediate OpenPath::path_id will
return None and the future will be ready immediately. If the failure happens
later, a PathEvent will be emitted.
-
Sourcepub fn path_events(&self) -> PathEvents
A stream of PathEvents for all paths in this connection.
+Sourcepub fn path_events(&self) -> PathEvents
A stream of PathEvents for all paths in this connection.
The stream will yield a PathEvent whenever there is a change in the state of any path in this connection.
The events need to be processed immediately, since there isn’t an unbounded buffer for them.
If processing of events lags behind too much, you will get an error of type crate::Lagged indicating
how many events were lost. The stream continues after a lag, delivering the oldest retained message next.
-Sourcepub fn nat_traversal_updates(&self) -> NatTraversalUpdates
A stream of NAT traversal updates for this connection.
+Sourcepub fn nat_traversal_updates(&self) -> NatTraversalUpdates
A stream of NAT traversal updates for this connection.
The events need to be processed immediately, since there isn’t an unbounded buffer for them.
If processing of events lags behind too much, you will get an error of type crate::Lagged indicating
how many events were lost. The stream continues after a lag, delivering the oldest retained message next.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason
Despite the return type’s name, closed connections are often not an error condition at the
application layer. Cases that might be routine include ConnectionError::LocallyClosed
and ConnectionError::ApplicationClosed.
-Sourcepub fn on_closed(&self) -> OnClosed ⓘ
Wait for the connection to be closed without keeping a strong reference to the connection
+Sourcepub fn on_closed(&self) -> OnClosed ⓘ
Wait for the connection to be closed without keeping a strong reference to the connection
Returns a future that resolves, once the connection is closed, to a tuple of
(ConnectionError, ConnectionStats).
Calling Self::closed keeps the connection alive until it is either closed locally via Connection::close
or closed by the remote peer. This function instead does not keep the connection itself alive,
so if all other clones of the connection are dropped, the connection will be closed implicitly even
if there are futures returned from this function still being awaited.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
Whether the connection is closed, and why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
Whether the connection is closed, and why.
The close_reason is always set to Some(ConnectionError) when a socket is
closed; whether it was closed manually by calling Connection::close() or due to
an internal error (such as an idle timeout or the peer closing the
connection).
Note: when the connection is closed, connection.close_reason().is_some() will always be true.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Close the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving
the CONNECTION_CLOSE frame.
@@ -93,7 +93,7 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close() the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub async fn handshake_confirmed(&self) -> Result<(), ConnectionError>
Wait for the handshake to be confirmed.
+Sourcepub async fn handshake_confirmed(&self) -> Result<(), ConnectionError>
Wait for the handshake to be confirmed.
As a server, who must be authenticated by clients,
this happens when the handshake completes
upon receiving a TLS Finished message from the client.
@@ -101,56 +101,44 @@ In return, the server send a HANDSHAKE_DONE frame.
As a client, this happens when receiving a HANDSHAKE_DONE frame.
At this point, the server has either accepted our authentication,
or, if client authentication is not required, accepted our lack of authentication.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmit data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmit data as an unreliable, unordered application datagram
Application datagrams are a low-level primitive. They may be lost or delivered out of order,
and data must both fit inside a single QUIC packet and be smaller than the maximum
dictated by the peer.
Previously queued datagrams which are still unsent may be discarded to make space for this
datagram, in order of oldest to newest.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmit data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmit data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Compute the maximum size of datagrams that may be passed to send_datagram().
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Compute the maximum size of datagrams that may be passed to send_datagram().
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path MTU
estimate. The peer can also enforce an arbitrarily small fixed limit, but if the peer’s
limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer
When greater than zero, calling send_datagram() with a datagram of
at most this size is guaranteed not to cause older datagrams to be dropped.
-Sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address
-If ServerConfig::migration is true, clients may change addresses at will,
-e.g. when switching to a cellular internet connection.
-If multipath is enabled this will return the address of any
-path, and may not be consistent. Prefer Path::remote_address instead.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established
-the connection
-This can be different from the address the endpoint is bound to, in case
-the endpoint is bound to a wildcard address like 0.0.0.0 or ::.
-This will return None for clients, or when the platform does not expose this
-information. See noq_udp::RecvMeta::dst_ip for a list of
-supported platforms when using noq_udp for I/O, which is the default.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time)
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics
-Sourcepub fn path_stats(&self, path_id: PathId) -> Option<PathStats>
Returns path statistics
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time)
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics
+Sourcepub fn path_stats(&self, path_id: PathId) -> Option<PathStats>
Returns path statistics
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for details on
the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection
Peer addresses and connection IDs can change, but this value will remain
fixed for the lifetime of the connection.
-Sourcepub fn force_key_update(&self)
Update traffic keys spontaneously
+Sourcepub fn force_key_update(&self)
Update traffic keys spontaneously
This primarily exists for testing purposes.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -161,17 +149,17 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modify the number of remotely initiated unidirectional streams that may be concurrently open
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modify the number of remotely initiated unidirectional streams that may be concurrently open
No streams may be opened by the peer unless fewer than count are already open. Large
counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_send_window(&self, send_window: u64)
Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modify the number of remotely initiated bidirectional streams that may be concurrently open
+Sourcepub fn set_send_window(&self, send_window: u64)
Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modify the number of remotely initiated bidirectional streams that may be concurrently open
No streams may be opened by the peer unless fewer than count are already open. Large
counts increase both minimum and worst-case memory consumption.
-Sourcepub fn observed_external_addr(&self) -> ObservedExternalAddr
Track changes on our external address as reported by the peer.
-Sourcepub fn is_multipath_enabled(&self) -> bool
Is multipath enabled?
-Sourcepub fn add_nat_traversal_address(
+
Sourcepub fn observed_external_addr(&self) -> ObservedExternalAddr
Track changes on our external address as reported by the peer.
+Sourcepub fn is_multipath_enabled(&self) -> bool
Is multipath enabled?
+Sourcepub fn add_nat_traversal_address(
&self,
address: SocketAddr,
) -> Result<(), Error>
Registers one address at which this endpoint might be reachable
@@ -179,7 +167,7 @@ strong and pseudorandom, and are suitable for use as keying material.
ADD_ADDRESS frames. This allows clients to obtain server address candidates to initiate
NAT traversal attempts. Clients provide their own reachable addresses in REACH_OUT frames
when Self::initiate_nat_traversal_round is called.
-Sourcepub fn remove_nat_traversal_address(
+
Sourcepub fn remove_nat_traversal_address(
&self,
address: SocketAddr,
) -> Result<(), Error>
Removes one or more addresses from the set of addresses at which this endpoint is reachable
@@ -188,18 +176,18 @@ clients in REMOVE_ADDRESS frames. This allows clients to stop using
server address candidates that are no longer valid for NAT traversal.
For clients, removed addresses will no longer be advertised in REACH_OUT frames.
Addresses not present in the set will be silently ignored.
-Sourcepub fn get_local_nat_traversal_addresses(
+
Sourcepub fn get_local_nat_traversal_addresses(
&self,
) -> Result<Vec<SocketAddr>, Error>
Get the current local nat traversal addresses
-Sourcepub fn get_remote_nat_traversal_addresses(
+
Sourcepub fn get_remote_nat_traversal_addresses(
&self,
) -> Result<Vec<SocketAddr>, Error>
Get the currently advertised nat traversal addresses by the server
-Sourcepub fn initiate_nat_traversal_round(&self) -> Result<Vec<SocketAddr>, Error>
Initiates a new nat traversal round
+Sourcepub fn initiate_nat_traversal_round(&self) -> Result<Vec<SocketAddr>, Error>
Initiates a new nat traversal round
A nat traversal round involves advertising the client’s local addresses in REACH_OUT
frames, and initiating probing of the known remote addresses. When a new round is
initiated, the previous one is cancelled, and paths that have not been opened are closed.
Returns the server addresses that are now being probed.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.OnClosed.html b/pr/619/docs/noq/struct.OnClosed.html
index fcc150193..a7bb35c6f 100644
--- a/pr/619/docs/noq/struct.OnClosed.html
+++ b/pr/619/docs/noq/struct.OnClosed.html
@@ -1,6 +1,6 @@
-OnClosed in noq - Rust OnClosed
pub struct OnClosed { /* private fields */ }
Expand description
Future returned by Connection::on_closed
+OnClosed in noq - Rust OnClosed
pub struct OnClosed { /* private fields */ }
Expand description
Future returned by Connection::on_closed
Resolves to a tuple of (ConnectionError, ConnectionStats).
-Trait Implementations§
Source§impl Future for OnClosed
Source§type Output = (ConnectionError, ConnectionStats)
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Future for OnClosed
Source§type Output = (ConnectionError, ConnectionStats)
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for OnClosed
§impl !RefUnwindSafe for OnClosed
§impl Send for OnClosed
§impl Sync for OnClosed
§impl Unpin for OnClosed
§impl !UnwindSafe for OnClosed
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.OpenBi.html b/pr/619/docs/noq/struct.OpenBi.html
index a098d55ad..0debf2eca 100644
--- a/pr/619/docs/noq/struct.OpenBi.html
+++ b/pr/619/docs/noq/struct.OpenBi.html
@@ -1,6 +1,6 @@
-OpenBi in noq - Rust OpenBi
pub struct OpenBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_bi
-Trait Implementations§
Source§impl Future for OpenBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenBi<'a>where
+OpenBi in noq - Rust OpenBi
pub struct OpenBi<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_bi
+Trait Implementations§
Source§impl Future for OpenBi<'_>
Source§type Output = Result<(SendStream, RecvStream), ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenBi<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for OpenBi<'a>
§impl<'a> !RefUnwindSafe for OpenBi<'a>
§impl<'a> Send for OpenBi<'a>
§impl<'a> Sync for OpenBi<'a>
§impl<'a> !UnwindSafe for OpenBi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.OpenUni.html b/pr/619/docs/noq/struct.OpenUni.html
index 54f7cedbe..324de9c42 100644
--- a/pr/619/docs/noq/struct.OpenUni.html
+++ b/pr/619/docs/noq/struct.OpenUni.html
@@ -1,6 +1,6 @@
-OpenUni in noq - Rust OpenUni
pub struct OpenUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_uni
-Trait Implementations§
Source§impl Future for OpenUni<'_>
Source§type Output = Result<SendStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenUni<'a>where
+OpenUni in noq - Rust OpenUni
pub struct OpenUni<'a> { /* private fields */ }
Expand description
Future produced by Connection::open_uni
+Trait Implementations§
Source§impl Future for OpenUni<'_>
Source§type Output = Result<SendStream, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for OpenUni<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for OpenUni<'a>
§impl<'a> !RefUnwindSafe for OpenUni<'a>
§impl<'a> Send for OpenUni<'a>
§impl<'a> Sync for OpenUni<'a>
§impl<'a> !UnwindSafe for OpenUni<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.Path.html b/pr/619/docs/noq/struct.Path.html
index ace476fdb..93edafae5 100644
--- a/pr/619/docs/noq/struct.Path.html
+++ b/pr/619/docs/noq/struct.Path.html
@@ -1,7 +1,7 @@
-Path in noq - Rust Path
pub struct Path { /* private fields */ }
Expand description
An open network transmission within a multipath-enabled connection.
+Path in noq - Rust Path
pub struct Path { /* private fields */ }
Expand description
An open network transmission within a multipath-enabled connection.
As long as a Path or WeakPathHandle is alive, it is ensured that the
PathStats for this path are not dropped even after the path is abandoned.
-Implementations§
Source§impl Path
Sourcepub fn weak_handle(&self) -> WeakPathHandle
Returns a WeakPathHandle for this path.
+Implementations§
Source§impl Path
Sourcepub fn weak_handle(&self) -> WeakPathHandle
Returns a WeakPathHandle for this path.
Holding a WeakPathHandle does not keep a connection alive, but ensures that the
path’s stats are not dropped until the underlying connection is dropped, even if the
path is abandoned.
@@ -28,8 +28,11 @@ returned.
Sourcepub fn observed_external_addr(&self) -> Result<AddressDiscovery, ClosedPath>
Track changes on our external address as reported by the peer.
If the address-discovery extension is not negotiated, the stream will never return.
Sourcepub fn remote_address(&self) -> Result<SocketAddr, ClosedPath>
The peer’s UDP address for this path.
-Sourcepub fn ping(&self) -> Result<(), ClosedPath>
Ping the remote endpoint over this path.
-Trait Implementations§
Source§impl PartialEq for Path
Source§fn eq(&self, other: &Self) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
+Sourcepub fn local_ip(&self) -> Result<Option<IpAddr>, ClosedPath>
The local IP used for this path, if known.
+Returns Ok(None) for clients or when the platform does not expose this information; see
+noq_udp::RecvMeta::dst_ip for supported platforms.
+Sourcepub fn ping(&self) -> Result<(), ClosedPath>
Ping the remote endpoint over this path.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Path
§impl RefUnwindSafe for Path
§impl Send for Path
§impl Sync for Path
§impl Unpin for Path
§impl UnwindSafe for Path
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.ReadDatagram.html b/pr/619/docs/noq/struct.ReadDatagram.html
index 4ce3655a4..aba7eb3cb 100644
--- a/pr/619/docs/noq/struct.ReadDatagram.html
+++ b/pr/619/docs/noq/struct.ReadDatagram.html
@@ -1,6 +1,6 @@
-ReadDatagram in noq - Rust ReadDatagram
pub struct ReadDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::read_datagram
-Trait Implementations§
Source§impl Future for ReadDatagram<'_>
Source§type Output = Result<Bytes, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for ReadDatagram<'a>where
+ReadDatagram in noq - Rust ReadDatagram
pub struct ReadDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::read_datagram
+Trait Implementations§
Source§impl Future for ReadDatagram<'_>
Source§type Output = Result<Bytes, ConnectionError>
The type of value produced on completion.Source§impl<'__pin, 'a> Unpin for ReadDatagram<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for ReadDatagram<'a>
§impl<'a> !RefUnwindSafe for ReadDatagram<'a>
§impl<'a> Send for ReadDatagram<'a>
§impl<'a> Sync for ReadDatagram<'a>
§impl<'a> !UnwindSafe for ReadDatagram<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.SendDatagram.html b/pr/619/docs/noq/struct.SendDatagram.html
index e29a91ed8..6f0cfcf49 100644
--- a/pr/619/docs/noq/struct.SendDatagram.html
+++ b/pr/619/docs/noq/struct.SendDatagram.html
@@ -1,6 +1,6 @@
-SendDatagram in noq - Rust SendDatagram
pub struct SendDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::send_datagram_wait
-Trait Implementations§
Source§impl Future for SendDatagram<'_>
Source§impl<'__pin, 'a> Unpin for SendDatagram<'a>where
+SendDatagram in noq - Rust SendDatagram
pub struct SendDatagram<'a> { /* private fields */ }
Expand description
Future produced by Connection::send_datagram_wait
+Trait Implementations§
Source§impl Future for SendDatagram<'_>
Source§impl<'__pin, 'a> Unpin for SendDatagram<'a>where
PinnedFieldsOf<__Origin<'__pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for SendDatagram<'a>
§impl<'a> !RefUnwindSafe for SendDatagram<'a>
§impl<'a> Send for SendDatagram<'a>
§impl<'a> Sync for SendDatagram<'a>
§impl<'a> !UnwindSafe for SendDatagram<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/struct.WeakConnectionHandle.html b/pr/619/docs/noq/struct.WeakConnectionHandle.html
index 6969cb307..3e05c3c97 100644
--- a/pr/619/docs/noq/struct.WeakConnectionHandle.html
+++ b/pr/619/docs/noq/struct.WeakConnectionHandle.html
@@ -1,10 +1,10 @@
-WeakConnectionHandle in noq - Rust WeakConnectionHandle
pub struct WeakConnectionHandle(/* private fields */);
Expand description
A handle to some connection internals, use with care.
+WeakConnectionHandle in noq - Rust WeakConnectionHandle
pub struct WeakConnectionHandle(/* private fields */);
Expand description
A handle to some connection internals, use with care.
This contains a weak reference to the connection so will not itself keep the connection
alive.
-Implementations§
Source§impl WeakConnectionHandle
Sourcepub fn is_alive(&self) -> bool
Returns true if the Connection associated with this handle is still alive.
-Sourcepub fn upgrade(&self) -> Option<Connection>
Upgrade the handle to a full Connection
-Sourcepub fn is_same_connection(&self, other: &Self) -> bool
Returns true if the two WeakConnectionHandle point at the same connection.
-Trait Implementations§
Source§impl Clone for WeakConnectionHandle
Source§fn clone(&self) -> WeakConnectionHandle
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for WeakConnectionHandle
§impl RefUnwindSafe for WeakConnectionHandle
§impl Send for WeakConnectionHandle
§impl Sync for WeakConnectionHandle
§impl Unpin for WeakConnectionHandle
§impl UnwindSafe for WeakConnectionHandle
Blanket Implementations§
Implementations§
Source§impl WeakConnectionHandle
Sourcepub fn is_alive(&self) -> bool
Returns true if the Connection associated with this handle is still alive.
+Sourcepub fn upgrade(&self) -> Option<Connection>
Upgrade the handle to a full Connection
+Sourcepub fn is_same_connection(&self, other: &Self) -> bool
Returns true if the two WeakConnectionHandle point at the same connection.
+Trait Implementations§
Source§impl Clone for WeakConnectionHandle
Source§fn clone(&self) -> WeakConnectionHandle
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for WeakConnectionHandle
§impl RefUnwindSafe for WeakConnectionHandle
§impl Send for WeakConnectionHandle
§impl Sync for WeakConnectionHandle
§impl Unpin for WeakConnectionHandle
§impl UnwindSafe for WeakConnectionHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.WeakPathHandle.html b/pr/619/docs/noq/struct.WeakPathHandle.html
index 967321d0a..9e6d5a2bd 100644
--- a/pr/619/docs/noq/struct.WeakPathHandle.html
+++ b/pr/619/docs/noq/struct.WeakPathHandle.html
@@ -1,12 +1,12 @@
-WeakPathHandle in noq - Rust WeakPathHandle
pub struct WeakPathHandle { /* private fields */ }
Expand description
Weak handle for a Path that does not keep the connection alive.
+WeakPathHandle in noq - Rust WeakPathHandle
pub struct WeakPathHandle { /* private fields */ }
Expand description
Weak handle for a Path that does not keep the connection alive.
As long as a WeakPathHandle for a path exists, that path’s final stats will not be dropped even if
the path was abandoned.
The WeakPathHandle can be upgraded to a Path as long as its Connection has not been dropped.
-Implementations§
Source§impl WeakPathHandle
Implementations§
Trait Implementations§
Source§impl Clone for WeakPathHandle
Source§impl Debug for WeakPathHandle
Source§impl Drop for WeakPathHandle
Source§impl PartialEq for WeakPathHandle
Source§impl Eq for WeakPathHandle
Auto Trait Implementations§
§impl Freeze for WeakPathHandle
§impl RefUnwindSafe for WeakPathHandle
§impl Send for WeakPathHandle
§impl Sync for WeakPathHandle
§impl Unpin for WeakPathHandle
§impl UnwindSafe for WeakPathHandle
Blanket Implementations§
Trait Implementations§
Source§impl Clone for WeakPathHandle
Source§impl Debug for WeakPathHandle
Source§impl Drop for WeakPathHandle
Source§impl PartialEq for WeakPathHandle
Source§impl Eq for WeakPathHandle
Auto Trait Implementations§
§impl Freeze for WeakPathHandle
§impl RefUnwindSafe for WeakPathHandle
§impl Send for WeakPathHandle
§impl Sync for WeakPathHandle
§impl Unpin for WeakPathHandle
§impl UnwindSafe for WeakPathHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/619/docs/noq/struct.ZeroRttAccepted.html b/pr/619/docs/noq/struct.ZeroRttAccepted.html
index f6332f3cd..d6f96d145 100644
--- a/pr/619/docs/noq/struct.ZeroRttAccepted.html
+++ b/pr/619/docs/noq/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in noq - Rust ZeroRttAccepted
pub struct ZeroRttAccepted(/* private fields */);
Expand description
Future that completes when a connection is fully established
+ZeroRttAccepted in noq - Rust ZeroRttAccepted
pub struct ZeroRttAccepted(/* private fields */);
Expand description
Future that completes when a connection is fully established
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/pr/619/docs/noq/trait.NetworkChangeHint.html b/pr/619/docs/noq/trait.NetworkChangeHint.html
index 2fb715fa0..63d289ea2 100644
--- a/pr/619/docs/noq/trait.NetworkChangeHint.html
+++ b/pr/619/docs/noq/trait.NetworkChangeHint.html
@@ -1,4 +1,4 @@
-NetworkChangeHint in noq - Rust NetworkChangeHint
pub trait NetworkChangeHint: Debug + 'static {
+NetworkChangeHint in noq - Rust NetworkChangeHint
pub trait NetworkChangeHint: Debug + 'static {
// Required method
fn is_path_recoverable(
&self,
@@ -6,7 +6,7 @@
network_path: FourTuple,
) -> bool;
}
Expand description
Hints when the caller identifies a network change.
-Required Methods§
Sourcefn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool
Inform the connection if a path may recover after a network change.
+Required Methods§
Sourcefn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool
Inform the connection if a path may recover after a network change.
After network changes, paths may not be recoverable. In this case, waiting for the path to
become idle may take longer than what is desirable. If Self::is_path_recoverable
returns false, a multipath-enabled, client-side connection will establish a new path to
diff --git a/pr/619/docs/noq_proto/enum.ClosePathError.html b/pr/619/docs/noq_proto/enum.ClosePathError.html
index d035a5e2d..1b194ffe1 100644
--- a/pr/619/docs/noq_proto/enum.ClosePathError.html
+++ b/pr/619/docs/noq_proto/enum.ClosePathError.html
@@ -1,4 +1,4 @@
-
ClosePathError in noq_proto - Rust ClosePathError
pub enum ClosePathError {
+ClosePathError in noq_proto - Rust ClosePathError