pub enum WebServerDestination {
Addr(SocketAddr),
Url(Url),
}Expand description
Represents a WebTransport server destination.
When setting up WebTransport servers and clients, this destination must be used.
WebTransportClientConfig::server_dest: Set the destination here. This tells the client where to connect.ServerSetupConfig::server_addresses: Store the destination as aSocketAddrin the server addresses for the WebTransport server. This is used to validate connect tokens.ClientAuthentication: Use the destination inClientAuthentication::Unsecure::server_addressor inConnectToken::generate()for secure auth. The server address is used internally byrenet2to coordinate packet sending and receiving.
The conversion SocketAddr::from(WebServerDestination::Url) is not reversible. The conversion involves
hashing the URL and pasting it into the socket address bytes (28 bytes total).
Variants§
Addr(SocketAddr)
Url(Url)
The server destination as a URL.
This URL must include the port number explicitly.
Trait Implementations§
Source§impl Clone for WebServerDestination
impl Clone for WebServerDestination
Source§fn clone(&self) -> WebServerDestination
fn clone(&self) -> WebServerDestination
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebServerDestination
impl Debug for WebServerDestination
Source§impl<'de> Deserialize<'de> for WebServerDestination
impl<'de> Deserialize<'de> for WebServerDestination
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<SocketAddr> for WebServerDestination
impl From<SocketAddr> for WebServerDestination
Source§fn from(addr: SocketAddr) -> Self
fn from(addr: SocketAddr) -> Self
Converts to this type from the input type.
Source§impl From<Url> for WebServerDestination
impl From<Url> for WebServerDestination
Source§impl From<WebServerDestination> for SocketAddr
impl From<WebServerDestination> for SocketAddr
Source§fn from(dest: WebServerDestination) -> Self
fn from(dest: WebServerDestination) -> Self
Converts to this type from the input type.
Source§impl Serialize for WebServerDestination
impl Serialize for WebServerDestination
Auto Trait Implementations§
impl Freeze for WebServerDestination
impl RefUnwindSafe for WebServerDestination
impl Send for WebServerDestination
impl Sync for WebServerDestination
impl Unpin for WebServerDestination
impl UnwindSafe for WebServerDestination
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.