pub struct Request { /* private fields */ }
Expand description
A connection request by the remote endpoint.
Dropping the request rejects it.
Implementations§
source§impl Request
impl Request
sourcepub fn remote_port(&self) -> u32
pub fn remote_port(&self) -> u32
The remote port number.
sourcepub fn id(&self) -> u32
pub fn id(&self) -> u32
The remotely provided id.
If no id was provided, this returns the remote port
.
sourcepub fn is_wait(&self) -> bool
pub fn is_wait(&self) -> bool
Indicates whether the handler of the request should wait for a local port to become available, if all are currently in use.
sourcepub async fn accept(self) -> Result<(Sender, Receiver), ListenerError>
pub async fn accept(self) -> Result<(Sender, Receiver), ListenerError>
Accepts the request using a newly allocated local port.
sourcepub async fn accept_from(
self,
local_port: PortNumber
) -> Result<(Sender, Receiver), ListenerError>
pub async fn accept_from( self, local_port: PortNumber ) -> Result<(Sender, Receiver), ListenerError>
Accepts the request using the specified local port.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl !RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl !UnwindSafe for Request
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