pub struct PaletteState { /* private fields */ }Expand description
Axum State for /v1/palette/* routes: the shared product application
plus the mounted authorization mode.
Implementations§
Source§impl PaletteState
impl PaletteState
pub fn new( application: Arc<SomaApplication>, authorization_mode: AuthorizationMode, ) -> Self
pub fn application(&self) -> &SomaApplication
Sourcepub fn execution_context(
&self,
subject: Option<&str>,
scopes: &[String],
) -> ExecutionContext
pub fn execution_context( &self, subject: Option<&str>, scopes: &[String], ) -> ExecutionContext
Build an [ExecutionContext] for a Palette request, tagged with
Surface::Palette so downstream provider dispatch applies Palette
surface policy (see ToolSpec::exposed_on).
Trait Implementations§
Source§impl Clone for PaletteState
impl Clone for PaletteState
Source§fn clone(&self) -> PaletteState
fn clone(&self) -> PaletteState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PaletteState
impl !RefUnwindSafe for PaletteState
impl Send for PaletteState
impl Sync for PaletteState
impl Unpin for PaletteState
impl UnsafeUnpin for PaletteState
impl !UnwindSafe for PaletteState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more