pub struct ConnectedControl<IO: PacketIO> { /* private fields */ }Implementations§
Source§impl<IO: PacketIO> ConnectedControl<IO>
impl<IO: PacketIO> ConnectedControl<IO>
pub fn new(control_addr: SocketAddr, udp: IO, pong: Pong) -> Self
pub fn control_addr(&self) -> SocketAddr
pub fn pong(&self) -> Pong
pub async fn auth_into_established<A: AuthResource>( self, auth: A, ) -> Result<EstablishedControl<A, IO>, SetupError>
pub fn into_established<A: AuthResource>( self, auth: A, registered: AgentRegistered, ) -> EstablishedControl<A, IO>
pub fn reset_established<A: AuthResource>( self, established: &mut EstablishedControl<A, IO>, registered: AgentRegistered, )
pub async fn authenticate<A: AuthResource>( &mut self, auth: &A, ) -> Result<AgentRegistered, SetupError>
pub async fn send<M: MessageEncoding>(&mut self, msg: &M) -> Result<()>
pub async fn recv(&mut self) -> Result<ControlFeed, ControlError>
Trait Implementations§
Auto Trait Implementations§
impl<IO> Freeze for ConnectedControl<IO>where
IO: Freeze,
impl<IO> RefUnwindSafe for ConnectedControl<IO>where
IO: RefUnwindSafe,
impl<IO> Send for ConnectedControl<IO>
impl<IO> Sync for ConnectedControl<IO>
impl<IO> Unpin for ConnectedControl<IO>where
IO: Unpin,
impl<IO> UnwindSafe for ConnectedControl<IO>where
IO: UnwindSafe,
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