pub struct ServerRoleHandle { /* private fields */ }Expand description
Server role: narrow responder + shared notification pool.
Service scope stays narrow: ReadProperty, optionally authorized local
Device.Description WriteProperty, optionally ReinitializeDevice through
its handler, and Reject/Abort. Full
bacnet-server parity is a later packet. No
lifecycle methods on this handle; the session owner drives dispatch +
close(). Send + Sync; every method fails closed after shutdown.
Implementations§
Source§impl ServerRoleHandle
impl ServerRoleHandle
Sourcepub fn is_session_alive(&self) -> bool
pub fn is_session_alive(&self) -> bool
Returns true while the owning session is alive and open.
Test seam proving no detached role outlives the endpoint: after the
session drops, Weak::upgrade fails and this returns false.
Cloned handles survive as values but report false and fail closed.
Sourcepub fn suspend_next_reply(&self) -> Result<(), Error>
pub fn suspend_next_reply(&self) -> Result<(), Error>
Arms one-shot deferred-reply suspension (RB-17 MS/TP wiring).
The next ordinary non-direct reply_tx-bearing request handled while this arm is
set answers token-owned via egress (after the MAC releases
ReplyPostponed) instead of promptly via reply_tx. Fails closed
once the owning session shuts down. Broadcasts (no reply_tx) never
consume the arm; neither do direct provenance or capability-bearing envelopes.
Sourcepub async fn handle_inbound(
&self,
received: ReceivedApdu,
) -> Result<bool, Error>
pub async fn handle_inbound( &self, received: ReceivedApdu, ) -> Result<bool, Error>
Handles one inbound request via the wire invoke ID directly.
Session dispatch only. Never touches the outbound coordinator pool.
Preserves the envelope’s identity and response capability for the responder.
Honors a pending RB-17 suspension arm identically to session dispatch:
ordinary prompt work drops reply_tx and answers token-owned via egress.
Direct/capability-bearing envelopes retain checked original-route policy.
Sourcepub fn complete_notification_pre_admitted(
&self,
admission: Admission,
apdu: &Apdu,
) -> bool
pub fn complete_notification_pre_admitted( &self, admission: Admission, apdu: &Apdu, ) -> bool
Completes one already-admitted notification lease (dispatch only).
The session’s single [admit_once] owns exact-once claim; this
releases the exact lease without re-admitting. Returns false after
shutdown.