pub struct SimpleAddressValidator(/* private fields */);Available on crate feature
server only.Expand description
A default implementation for AddressValidator
Implementations§
Trait Implementations§
Source§impl AddressValidator for SimpleAddressValidator
impl AddressValidator for SimpleAddressValidator
Source§fn mint_retry_token(
&self,
_scid: &ConnectionId<'_>,
dcid: &ConnectionId<'_>,
new_scid: &ConnectionId<'_>,
src: &SocketAddr,
) -> Result<Vec<u8>>
fn mint_retry_token( &self, _scid: &ConnectionId<'_>, dcid: &ConnectionId<'_>, new_scid: &ConnectionId<'_>, src: &SocketAddr, ) -> Result<Vec<u8>>
Create a retry-token.
Source§fn validate_address<'a>(
&self,
_: &ConnectionId<'_>,
dcid: &ConnectionId<'_>,
src: &SocketAddr,
token: &'a [u8],
) -> Option<ConnectionId<'a>>
fn validate_address<'a>( &self, _: &ConnectionId<'_>, dcid: &ConnectionId<'_>, src: &SocketAddr, token: &'a [u8], ) -> Option<ConnectionId<'a>>
Validate the source address.
Auto Trait Implementations§
impl Freeze for SimpleAddressValidator
impl RefUnwindSafe for SimpleAddressValidator
impl Send for SimpleAddressValidator
impl Sync for SimpleAddressValidator
impl Unpin for SimpleAddressValidator
impl UnwindSafe for SimpleAddressValidator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more