pub struct AccessRequest {
pub client_id: String,
pub user_id: Option<String>,
pub permission: String,
/* private fields */
}Expand description
A remote client asking permission to interact with the device — e.g. a Studio client wanting to join the device’s session (Studio’s “session joining access control”).
The bridge surfaces these through Bridge::access_requests; whoever
consumes the stream (an operator UI, a headless auto-approval policy)
answers with respond. Dropping the request
unanswered leaves the decision to the bridge, which typically treats it as
a rejection.
Fields§
§client_id: StringThe requesting client’s session id (e.g. the Studio client id).
user_id: Option<String>The user behind the client (e.g. the Firebase user id found in the device’s permission lists), when the transport carries it.
permission: StringWhat is being requested, human-readable and ready to embed in a prompt — e.g. “join the session”, “claim the device”.
Implementations§
Source§impl AccessRequest
impl AccessRequest
Sourcepub fn new(
client_id: impl Into<String>,
user_id: Option<String>,
permission: impl Into<String>,
) -> (Self, Receiver<AccessDecision>)
pub fn new( client_id: impl Into<String>, user_id: Option<String>, permission: impl Into<String>, ) -> (Self, Receiver<AccessDecision>)
Build a request plus the receiver its decision arrives on (for Bridge
impls).
Sourcepub fn respond(self, decision: AccessDecision)
pub fn respond(self, decision: AccessDecision)
Answer the request. Ignores a dropped receiver.