pub struct DeviceServer {
pub identity: DeviceIdentity,
pub mac_address: String,
pub capabilities: CapabilitySet,
pub credentials: NodeCredentials,
}Expand description
Minimal device-side server skeleton that wires discovery + handshake together.
Fields§
§identity: DeviceIdentity§mac_address: String§capabilities: CapabilitySet§credentials: NodeCredentialsImplementations§
Source§impl DeviceServer
impl DeviceServer
Sourcepub fn discovery_responder(&self) -> DiscoveryResponder
pub fn discovery_responder(&self) -> DiscoveryResponder
Build a discovery responder that signs replies with the device credentials.
Sourcepub async fn accept<T: HandshakeTransport + Send>(
&self,
transport: &mut T,
) -> Result<AlnpSession, HandshakeError>
pub async fn accept<T: HandshakeTransport + Send>( &self, transport: &mut T, ) -> Result<AlnpSession, HandshakeError>
Accept an inbound session using the provided transport.
Auto Trait Implementations§
impl Freeze for DeviceServer
impl RefUnwindSafe for DeviceServer
impl Send for DeviceServer
impl Sync for DeviceServer
impl Unpin for DeviceServer
impl UnwindSafe for DeviceServer
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