Struct ConnectOptions
#[non_exhaustive]pub struct ConnectOptions {
pub token: Option<String>,
pub path: Option<String>,
pub cost: Option<u64>,
pub quic: ConnectOptions,
}Expand description
How to dial a peer with Node::connect_with.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.token: Option<String>A token to present, sent in the MoQ SETUP and as ?jwt= in the setup path.
The accepting node reads it as [SessionRequest::token].
path: Option<String>The path the SETUP requests, without a query.
The accepting node reads it as [SessionRequest::path]. None requests
the root.
cost: Option<u64>The cost added to every route learned over this link.
None keeps moq’s default of one.
quic: ConnectOptionsiroh’s options for the QUIC dial.
Set a transport config here to dial with another
Congestion controller. The default keeps the
endpoint’s transport config, which runs BBR3 under
MoqPreset. It applies to a direct dial only: a
session that already exists keeps its connection, so close it first to
dial again with other options. A relay link ignores it.
Implementations§
§impl ConnectOptions
impl ConnectOptions
pub fn with_token(self, token: impl Into<String>) -> ConnectOptions
pub fn with_token(self, token: impl Into<String>) -> ConnectOptions
Returns these options with token presented to the peer.
pub fn with_path(self, path: impl Into<String>) -> ConnectOptions
pub fn with_path(self, path: impl Into<String>) -> ConnectOptions
Returns these options with path requested in the SETUP.
pub fn with_cost(self, cost: u64) -> ConnectOptions
pub fn with_cost(self, cost: u64) -> ConnectOptions
Returns these options with cost added to every route learned over the link.
pub fn with_quic(self, quic: ConnectOptions) -> ConnectOptions
pub fn with_quic(self, quic: ConnectOptions) -> ConnectOptions
Returns these options with iroh’s quic options for the dial.
Trait Implementations§
§impl Clone for ConnectOptions
impl Clone for ConnectOptions
§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more