pub struct PrivacyPreflight { /* private fields */ }Expand description
Runs one optional privacy judge call through the host’s existing Call handler.
The caller applies thresholds, chooses permitted targets, and retains task restrictions.
Routing and externally supplied restrictions do not require this detector.
Implementations§
Source§impl PrivacyPreflight
impl PrivacyPreflight
Sourcepub fn decision(target: ModelId, instructions: Option<&Value>) -> Self
pub fn decision(target: ModelId, instructions: Option<&Value>) -> Self
Builds a typed decision question, optionally replacing its standing instructions.
Sourcepub fn llm(
target: ModelId,
prompt: Option<&str>,
format: ClassifierResponseFormat,
) -> Result<Self>
pub fn llm( target: ModelId, prompt: Option<&str>, format: ClassifierResponseFormat, ) -> Result<Self>
Builds a JSON judge using the shared classifier contract and typed decoder. Returns an error if the prompt or response contract is invalid.
Sourcepub async fn assess<F, Fut>(
&self,
request: &Request,
serve: F,
) -> PrivacyAssessment
pub async fn assess<F, Fut>( &self, request: &Request, serve: F, ) -> PrivacyAssessment
Assesses complete normalized content with one host-served call. Failures return a bounded reason with no clear score. Dropping this future cancels assessment and host work; no background task is spawned.
Auto Trait Implementations§
impl !RefUnwindSafe for PrivacyPreflight
impl !UnwindSafe for PrivacyPreflight
impl Freeze for PrivacyPreflight
impl Send for PrivacyPreflight
impl Sync for PrivacyPreflight
impl Unpin for PrivacyPreflight
impl UnsafeUnpin for PrivacyPreflight
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