pub struct NewToken {
pub label: Option<String>,
pub expiration: Option<String>,
pub scopes: Option<Vec<String>>,
pub workspace_id: Option<String>,
pub read_only: Option<bool>,
pub super_admin: Option<bool>,
}Fields§
§label: Option<String>§expiration: Option<String>§scopes: Option<Vec<String>>§workspace_id: Option<String>§read_only: Option<bool>If true, the token is restricted to read-only HTTP methods (GET/HEAD/OPTIONS). Mutating endpoints and job-run actions are rejected with 403, regardless of the scopes attached.
super_admin: Option<bool>For an MCP token (an mcp: scope) owned by a superadmin: carry the owner’s superadmin rights, reaching every workspace rather than only their memberships. Ignored for other tokens, which always carry them.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NewToken
impl<'de> Deserialize<'de> for NewToken
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
impl StructuralPartialEq for NewToken
Auto Trait Implementations§
impl Forget for NewToken
impl Freeze for NewToken
impl RefUnwindSafe for NewToken
impl Send for NewToken
impl Sync for NewToken
impl Unpin for NewToken
impl UnsafeUnpin for NewToken
impl UnwindSafe for NewToken
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