pub struct GuardrailsApi { /* private fields */ }Expand description
Guardrail policies
Implementations§
Source§impl GuardrailsApi
impl GuardrailsApi
Sourcepub async fn create(&self, body: &CreateGuardrailRequest) -> Result<Guardrail>
pub async fn create(&self, body: &CreateGuardrailRequest) -> Result<Guardrail>
Register a custom guardrail
POST /api/v1/guardrails
Required scopes: guardrails:write.
Sourcepub async fn delete(
&self,
guardrail_id: &str,
) -> Result<DeleteGuardrailResponse>
pub async fn delete( &self, guardrail_id: &str, ) -> Result<DeleteGuardrailResponse>
Delete a guardrail
DELETE /api/v1/guardrails/{guardrailId}
Required scopes: guardrails:write.
Sourcepub async fn list(&self) -> Result<ListGuardrailsResponse>
pub async fn list(&self) -> Result<ListGuardrailsResponse>
List guardrails
GET /api/v1/guardrails
Required scopes: guardrails:read.
Trait Implementations§
Source§impl Clone for GuardrailsApi
impl Clone for GuardrailsApi
Source§fn clone(&self) -> GuardrailsApi
fn clone(&self) -> GuardrailsApi
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 !RefUnwindSafe for GuardrailsApi
impl !UnwindSafe for GuardrailsApi
impl Freeze for GuardrailsApi
impl Send for GuardrailsApi
impl Sync for GuardrailsApi
impl Unpin for GuardrailsApi
impl UnsafeUnpin for GuardrailsApi
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