pub struct TokenSourceFetchOptions { /* private fields */ }Expand description
Per-call overrides used to parameterize a token request.
Every option is optional: anything left unset is omitted from the request and the server picks a default. Set only the options you care about:
let options = TokenSourceFetchOptions::new()
.with_room_name("my-room")
.with_participant_identity("user-123");Implementations§
Source§impl TokenSourceFetchOptions
impl TokenSourceFetchOptions
Sourcepub fn with_room_name(self, value: impl Into<String>) -> Self
pub fn with_room_name(self, value: impl Into<String>) -> Self
Sets the name of the room being requested when generating credentials.
Sourcepub fn with_participant_name(self, value: impl Into<String>) -> Self
pub fn with_participant_name(self, value: impl Into<String>) -> Self
Sets the name of the participant being requested when generating credentials.
Sourcepub fn with_participant_identity(self, value: impl Into<String>) -> Self
pub fn with_participant_identity(self, value: impl Into<String>) -> Self
Sets the identity of the participant being requested when generating credentials.
Sourcepub fn with_participant_metadata(self, value: impl Into<String>) -> Self
pub fn with_participant_metadata(self, value: impl Into<String>) -> Self
Sets the metadata of the participant being requested when generating credentials.
Sourcepub fn with_participant_attributes(
self,
value: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>,
) -> Self
pub fn with_participant_attributes( self, value: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, ) -> Self
Adds the given attributes to the participant attributes, keeping any set previously. A key that was already set is overwritten with its new value.
Sourcepub fn with_participant_attribute(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_participant_attribute( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Adds a single attribute to the participant attributes, keeping any set previously.
Sourcepub fn with_agent_name(self, value: impl Into<String>) -> Self
pub fn with_agent_name(self, value: impl Into<String>) -> Self
Sets the name of the agent to dispatch into the room.
Sourcepub fn with_agent_metadata(self, value: impl Into<String>) -> Self
pub fn with_agent_metadata(self, value: impl Into<String>) -> Self
Sets the metadata to pass to the dispatched agent.
Sourcepub fn with_deployment(self, value: impl Into<String>) -> Self
pub fn with_deployment(self, value: impl Into<String>) -> Self
Sets the agent deployment to target. Leave unset to target the production deployment.