pub struct BedrockGuardrailConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> BedrockGuardrailConfigBuilder<S>
impl<S: State> BedrockGuardrailConfigBuilder<S>
Sourcepub fn build(self) -> BedrockGuardrailConfigwhere
S: IsComplete,
pub fn build(self) -> BedrockGuardrailConfigwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn guardrail_identifier(
self,
value: impl Into<String>,
) -> BedrockGuardrailConfigBuilder<SetGuardrailIdentifier<S>>where
S::GuardrailIdentifier: IsUnset,
pub fn guardrail_identifier(
self,
value: impl Into<String>,
) -> BedrockGuardrailConfigBuilder<SetGuardrailIdentifier<S>>where
S::GuardrailIdentifier: IsUnset,
Required.
Guardrail identifier.
Sourcepub fn guardrail_version(
self,
value: impl Into<String>,
) -> BedrockGuardrailConfigBuilder<SetGuardrailVersion<S>>where
S::GuardrailVersion: IsUnset,
pub fn guardrail_version(
self,
value: impl Into<String>,
) -> BedrockGuardrailConfigBuilder<SetGuardrailVersion<S>>where
S::GuardrailVersion: IsUnset,
Required.
Guardrail version, such as "1" or "DRAFT".
Sourcepub fn trace(
self,
value: BedrockGuardrailTrace,
) -> BedrockGuardrailConfigBuilder<SetTrace<S>>where
S::Trace: IsUnset,
pub fn trace(
self,
value: BedrockGuardrailTrace,
) -> BedrockGuardrailConfigBuilder<SetTrace<S>>where
S::Trace: IsUnset,
Optional (Some / Option setters).
Trace mode. Default BedrockGuardrailTrace::Enabled.
Sourcepub fn maybe_trace(
self,
value: Option<BedrockGuardrailTrace>,
) -> BedrockGuardrailConfigBuilder<SetTrace<S>>where
S::Trace: IsUnset,
pub fn maybe_trace(
self,
value: Option<BedrockGuardrailTrace>,
) -> BedrockGuardrailConfigBuilder<SetTrace<S>>where
S::Trace: IsUnset,
Optional (Some / Option setters).
Trace mode. Default BedrockGuardrailTrace::Enabled.
Sourcepub fn stream_processing_mode(
self,
value: BedrockGuardrailStreamProcessingMode,
) -> BedrockGuardrailConfigBuilder<SetStreamProcessingMode<S>>where
S::StreamProcessingMode: IsUnset,
pub fn stream_processing_mode(
self,
value: BedrockGuardrailStreamProcessingMode,
) -> BedrockGuardrailConfigBuilder<SetStreamProcessingMode<S>>where
S::StreamProcessingMode: IsUnset,
Sourcepub fn maybe_stream_processing_mode(
self,
value: Option<BedrockGuardrailStreamProcessingMode>,
) -> BedrockGuardrailConfigBuilder<SetStreamProcessingMode<S>>where
S::StreamProcessingMode: IsUnset,
pub fn maybe_stream_processing_mode(
self,
value: Option<BedrockGuardrailStreamProcessingMode>,
) -> BedrockGuardrailConfigBuilder<SetStreamProcessingMode<S>>where
S::StreamProcessingMode: IsUnset,
Sourcepub fn redaction(
self,
value: BedrockGuardrailRedactionConfig,
) -> BedrockGuardrailConfigBuilder<SetRedaction<S>>where
S::Redaction: IsUnset,
pub fn redaction(
self,
value: BedrockGuardrailRedactionConfig,
) -> BedrockGuardrailConfigBuilder<SetRedaction<S>>where
S::Redaction: IsUnset,
Sourcepub fn maybe_redaction(
self,
value: Option<BedrockGuardrailRedactionConfig>,
) -> BedrockGuardrailConfigBuilder<SetRedaction<S>>where
S::Redaction: IsUnset,
pub fn maybe_redaction(
self,
value: Option<BedrockGuardrailRedactionConfig>,
) -> BedrockGuardrailConfigBuilder<SetRedaction<S>>where
S::Redaction: IsUnset,
Sourcepub fn guard_latest_user_message(
self,
value: bool,
) -> BedrockGuardrailConfigBuilder<SetGuardLatestUserMessage<S>>where
S::GuardLatestUserMessage: IsUnset,
pub fn guard_latest_user_message(
self,
value: bool,
) -> BedrockGuardrailConfigBuilder<SetGuardLatestUserMessage<S>>where
S::GuardLatestUserMessage: IsUnset,
Sourcepub fn maybe_guard_latest_user_message(
self,
value: Option<bool>,
) -> BedrockGuardrailConfigBuilder<SetGuardLatestUserMessage<S>>where
S::GuardLatestUserMessage: IsUnset,
pub fn maybe_guard_latest_user_message(
self,
value: Option<bool>,
) -> BedrockGuardrailConfigBuilder<SetGuardLatestUserMessage<S>>where
S::GuardLatestUserMessage: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for BedrockGuardrailConfigBuilder<S>
impl<S> RefUnwindSafe for BedrockGuardrailConfigBuilder<S>
impl<S> Send for BedrockGuardrailConfigBuilder<S>
impl<S> Sync for BedrockGuardrailConfigBuilder<S>
impl<S> Unpin for BedrockGuardrailConfigBuilder<S>
impl<S> UnsafeUnpin for BedrockGuardrailConfigBuilder<S>
impl<S> UnwindSafe for BedrockGuardrailConfigBuilder<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
Mutably borrows from an owned value. Read more
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> ⓘ
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 moreCreates a shared type from an unshared type.