pub struct TokenRestrictions {
pub enabled: Option<bool>,
pub allowed_origins: Option<Vec<String>>,
pub allowed_assistant_ids: Option<Vec<String>>,
pub allow_transient_assistant: Option<bool>,
}
Fields§
§enabled: Option<bool>
This determines whether the token is enabled or disabled. Default is true, it’s enabled.
allowed_origins: Option<Vec<String>>
This determines the allowed origins for this token. Validates the Origin
header. Default is any origin. Only relevant for public
tokens.
allowed_assistant_ids: Option<Vec<String>>
This determines which assistantIds can be used when creating a call. Default is any assistantId. Only relevant for public
tokens.
allow_transient_assistant: Option<bool>
This determines whether transient assistants can be used when creating a call. Default is true. If allowedAssistantIds
is provided, this is automatically false. Only relevant for public
tokens.
Implementations§
Source§impl TokenRestrictions
impl TokenRestrictions
pub fn new() -> TokenRestrictions
Trait Implementations§
Source§impl Clone for TokenRestrictions
impl Clone for TokenRestrictions
Source§fn clone(&self) -> TokenRestrictions
fn clone(&self) -> TokenRestrictions
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TokenRestrictions
impl Debug for TokenRestrictions
Source§impl Default for TokenRestrictions
impl Default for TokenRestrictions
Source§fn default() -> TokenRestrictions
fn default() -> TokenRestrictions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TokenRestrictions
impl<'de> Deserialize<'de> for TokenRestrictions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TokenRestrictions
impl PartialEq for TokenRestrictions
Source§impl Serialize for TokenRestrictions
impl Serialize for TokenRestrictions
impl StructuralPartialEq for TokenRestrictions
Auto Trait Implementations§
impl Freeze for TokenRestrictions
impl RefUnwindSafe for TokenRestrictions
impl Send for TokenRestrictions
impl Sync for TokenRestrictions
impl Unpin for TokenRestrictions
impl UnwindSafe for TokenRestrictions
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