pub struct SuccessContract { /* private fields */ }Expand description
Expected canonical result of a successful provider invocation.
Implementations§
Source§impl SuccessContract
impl SuccessContract
Sourcepub fn new(provider: impl Into<String>) -> Self
pub fn new(provider: impl Into<String>) -> Self
Starts a contract for one canonical provider namespace.
Sourcepub fn visible_text(self, text: impl Into<String>) -> Self
pub fn visible_text(self, text: impl Into<String>) -> Self
Requires exact model-visible text.
Sourcepub fn reasoning(self, reasoning: impl Into<String>) -> Self
pub fn reasoning(self, reasoning: impl Into<String>) -> Self
Requires exact concatenated canonical reasoning text.
Sourcepub const fn usage(self, usage: ModelUsage) -> Self
pub const fn usage(self, usage: ModelUsage) -> Self
Requires exact normalized usage.
Sourcepub const fn provider_events(self) -> Self
pub const fn provider_events(self) -> Self
Requires at least one correctly namespaced raw provider event.
Trait Implementations§
Source§impl Clone for SuccessContract
impl Clone for SuccessContract
Source§fn clone(&self) -> SuccessContract
fn clone(&self) -> SuccessContract
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 moreSource§impl Debug for SuccessContract
impl Debug for SuccessContract
impl Eq for SuccessContract
Source§impl PartialEq for SuccessContract
impl PartialEq for SuccessContract
impl StructuralPartialEq for SuccessContract
Auto Trait Implementations§
impl Freeze for SuccessContract
impl RefUnwindSafe for SuccessContract
impl Send for SuccessContract
impl Sync for SuccessContract
impl Unpin for SuccessContract
impl UnsafeUnpin for SuccessContract
impl UnwindSafe for SuccessContract
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