pub enum ClientPrincipal {
User {
user_id: String,
},
Space {
tenant_id: String,
scope_id: String,
},
}Expand description
The authority under which a Client acts. A Space principal is a restricted Client enrolled in one Space, not an owner or the Space’s Core service.
Variants§
Implementations§
Source§impl ClientPrincipal
impl ClientPrincipal
Sourcepub fn user_id(&self) -> Option<&str>
pub fn user_id(&self) -> Option<&str>
No initializer, billing owner or service identity fallback.
pub fn validate_for(&self, tenant_id: &str, scope_id: &str) -> bool
Sourcepub fn client_surface(
&self,
tenant_id: &str,
scope_id: &str,
) -> Result<ConversationSurface, SurfaceParseError>
pub fn client_surface( &self, tenant_id: &str, scope_id: &str, ) -> Result<ConversationSurface, SurfaceParseError>
Conversation selection is owned by authenticated ingress, never request payloads. The caller must retain tenant and scope alongside the returned surface.
Trait Implementations§
Source§impl Clone for ClientPrincipal
impl Clone for ClientPrincipal
Source§impl Debug for ClientPrincipal
impl Debug for ClientPrincipal
Source§impl<'de> Deserialize<'de> for ClientPrincipal
impl<'de> Deserialize<'de> for ClientPrincipal
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 Eq for ClientPrincipal
Source§impl Hash for ClientPrincipal
impl Hash for ClientPrincipal
Source§impl PartialEq for ClientPrincipal
impl PartialEq for ClientPrincipal
Source§impl Serialize for ClientPrincipal
impl Serialize for ClientPrincipal
impl StructuralPartialEq for ClientPrincipal
Auto Trait Implementations§
impl Freeze for ClientPrincipal
impl RefUnwindSafe for ClientPrincipal
impl Send for ClientPrincipal
impl Sync for ClientPrincipal
impl Unpin for ClientPrincipal
impl UnsafeUnpin for ClientPrincipal
impl UnwindSafe for ClientPrincipal
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