pub struct DogwoodAuthorizationConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> DogwoodAuthorizationConfigBuilder<S>
impl<S: State> DogwoodAuthorizationConfigBuilder<S>
Sourcepub fn build(self) -> DogwoodAuthorizationConfigwhere
S: IsComplete,
pub fn build(self) -> DogwoodAuthorizationConfigwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn policies(
self,
value: impl Into<String>,
) -> DogwoodAuthorizationConfigBuilder<SetPolicies<S>>where
S::Policies: IsUnset,
pub fn policies(
self,
value: impl Into<String>,
) -> DogwoodAuthorizationConfigBuilder<SetPolicies<S>>where
S::Policies: IsUnset,
Required.
Dogwood policy text, or the path of a .dw file.
Sourcepub fn tools(
self,
value: Vec<ToolSpec>,
) -> DogwoodAuthorizationConfigBuilder<SetTools<S>>where
S::Tools: IsUnset,
pub fn tools(
self,
value: Vec<ToolSpec>,
) -> DogwoodAuthorizationConfigBuilder<SetTools<S>>where
S::Tools: IsUnset,
Optional (Some / Option setters).
Tools the action schema is generated from, when no action_schema is given. A tool’s spec
is Tool::tool_spec.
Sourcepub fn maybe_tools(
self,
value: Option<Vec<ToolSpec>>,
) -> DogwoodAuthorizationConfigBuilder<SetTools<S>>where
S::Tools: IsUnset,
pub fn maybe_tools(
self,
value: Option<Vec<ToolSpec>>,
) -> DogwoodAuthorizationConfigBuilder<SetTools<S>>where
S::Tools: IsUnset,
Optional (Some / Option setters).
Tools the action schema is generated from, when no action_schema is given. A tool’s spec
is Tool::tool_spec.
Sourcepub fn action_schema(
self,
value: impl Into<String>,
) -> DogwoodAuthorizationConfigBuilder<SetActionSchema<S>>where
S::ActionSchema: IsUnset,
pub fn action_schema(
self,
value: impl Into<String>,
) -> DogwoodAuthorizationConfigBuilder<SetActionSchema<S>>where
S::ActionSchema: IsUnset,
Sourcepub fn maybe_action_schema(
self,
value: Option<impl Into<String>>,
) -> DogwoodAuthorizationConfigBuilder<SetActionSchema<S>>where
S::ActionSchema: IsUnset,
pub fn maybe_action_schema(
self,
value: Option<impl Into<String>>,
) -> DogwoodAuthorizationConfigBuilder<SetActionSchema<S>>where
S::ActionSchema: IsUnset,
Sourcepub fn entities(
self,
value: Vec<EntityInput>,
) -> DogwoodAuthorizationConfigBuilder<SetEntities<S>>where
S::Entities: IsUnset,
pub fn entities(
self,
value: Vec<EntityInput>,
) -> DogwoodAuthorizationConfigBuilder<SetEntities<S>>where
S::Entities: IsUnset,
Sourcepub fn maybe_entities(
self,
value: Option<Vec<EntityInput>>,
) -> DogwoodAuthorizationConfigBuilder<SetEntities<S>>where
S::Entities: IsUnset,
pub fn maybe_entities(
self,
value: Option<Vec<EntityInput>>,
) -> DogwoodAuthorizationConfigBuilder<SetEntities<S>>where
S::Entities: IsUnset,
Sourcepub fn namespace(
self,
value: impl Into<String>,
) -> DogwoodAuthorizationConfigBuilder<SetNamespace<S>>where
S::Namespace: IsUnset,
pub fn namespace(
self,
value: impl Into<String>,
) -> DogwoodAuthorizationConfigBuilder<SetNamespace<S>>where
S::Namespace: IsUnset,
Sourcepub fn maybe_namespace(
self,
value: Option<impl Into<String>>,
) -> DogwoodAuthorizationConfigBuilder<SetNamespace<S>>where
S::Namespace: IsUnset,
pub fn maybe_namespace(
self,
value: Option<impl Into<String>>,
) -> DogwoodAuthorizationConfigBuilder<SetNamespace<S>>where
S::Namespace: IsUnset,
Sourcepub fn principal(
self,
value: EntityRef,
) -> DogwoodAuthorizationConfigBuilder<SetPrincipal<S>>where
S::Principal: IsUnset,
pub fn principal(
self,
value: EntityRef,
) -> DogwoodAuthorizationConfigBuilder<SetPrincipal<S>>where
S::Principal: IsUnset,
Sourcepub fn maybe_principal(
self,
value: Option<EntityRef>,
) -> DogwoodAuthorizationConfigBuilder<SetPrincipal<S>>where
S::Principal: IsUnset,
pub fn maybe_principal(
self,
value: Option<EntityRef>,
) -> DogwoodAuthorizationConfigBuilder<SetPrincipal<S>>where
S::Principal: IsUnset,
Sourcepub fn principal_resolver(
self,
value: impl Into<PrincipalResolver>,
) -> DogwoodAuthorizationConfigBuilder<SetPrincipalResolver<S>>where
S::PrincipalResolver: IsUnset,
pub fn principal_resolver(
self,
value: impl Into<PrincipalResolver>,
) -> DogwoodAuthorizationConfigBuilder<SetPrincipalResolver<S>>where
S::PrincipalResolver: IsUnset,
Sourcepub fn maybe_principal_resolver(
self,
value: Option<impl Into<PrincipalResolver>>,
) -> DogwoodAuthorizationConfigBuilder<SetPrincipalResolver<S>>where
S::PrincipalResolver: IsUnset,
pub fn maybe_principal_resolver(
self,
value: Option<impl Into<PrincipalResolver>>,
) -> DogwoodAuthorizationConfigBuilder<SetPrincipalResolver<S>>where
S::PrincipalResolver: IsUnset,
Sourcepub fn context_enricher(
self,
value: impl Into<ContextEnricher>,
) -> DogwoodAuthorizationConfigBuilder<SetContextEnricher<S>>where
S::ContextEnricher: IsUnset,
pub fn context_enricher(
self,
value: impl Into<ContextEnricher>,
) -> DogwoodAuthorizationConfigBuilder<SetContextEnricher<S>>where
S::ContextEnricher: IsUnset,
Sourcepub fn maybe_context_enricher(
self,
value: Option<impl Into<ContextEnricher>>,
) -> DogwoodAuthorizationConfigBuilder<SetContextEnricher<S>>where
S::ContextEnricher: IsUnset,
pub fn maybe_context_enricher(
self,
value: Option<impl Into<ContextEnricher>>,
) -> DogwoodAuthorizationConfigBuilder<SetContextEnricher<S>>where
S::ContextEnricher: IsUnset,
Sourcepub fn on_error(
self,
value: OnError,
) -> DogwoodAuthorizationConfigBuilder<SetOnError<S>>where
S::OnError: IsUnset,
pub fn on_error(
self,
value: OnError,
) -> DogwoodAuthorizationConfigBuilder<SetOnError<S>>where
S::OnError: IsUnset,
Optional (Some / Option setters).
What happens when the resolver or enricher fails. Defaults to OnError::Throw;
OnError::Deny fails closed; OnError::Proceed runs the tool without any check. A
failed Dogwood decision always denies.
Sourcepub fn maybe_on_error(
self,
value: Option<OnError>,
) -> DogwoodAuthorizationConfigBuilder<SetOnError<S>>where
S::OnError: IsUnset,
pub fn maybe_on_error(
self,
value: Option<OnError>,
) -> DogwoodAuthorizationConfigBuilder<SetOnError<S>>where
S::OnError: IsUnset,
Optional (Some / Option setters).
What happens when the resolver or enricher fails. Defaults to OnError::Throw;
OnError::Deny fails closed; OnError::Proceed runs the tool without any check. A
failed Dogwood decision always denies.
Auto Trait Implementations§
impl<S = Empty> !RefUnwindSafe for DogwoodAuthorizationConfigBuilder<S>
impl<S = Empty> !UnwindSafe for DogwoodAuthorizationConfigBuilder<S>
impl<S> Freeze for DogwoodAuthorizationConfigBuilder<S>
impl<S> Send for DogwoodAuthorizationConfigBuilder<S>
impl<S> Sync for DogwoodAuthorizationConfigBuilder<S>
impl<S> Unpin for DogwoodAuthorizationConfigBuilder<S>
impl<S> UnsafeUnpin for DogwoodAuthorizationConfigBuilder<S>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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