pub struct Refusal { /* private fields */ }Expand description
Typed refusal helper returned by generation-refusal errors.
Implementations§
Source§impl Refusal
impl Refusal
Sourcepub fn new(entries: impl IntoIterator<Item = Entry>) -> Self
pub fn new(entries: impl IntoIterator<Item = Entry>) -> Self
Create a refusal helper from transcript entries.
Sourcepub fn transcript(&self) -> Option<&Transcript>
pub fn transcript(&self) -> Option<&Transcript>
Borrow the local transcript, if this refusal was constructed from entries.
Sourcepub fn explanation(&self) -> Result<SessionResponse<String>, FMError>
pub fn explanation(&self) -> Result<SessionResponse<String>, FMError>
Sourcepub fn explanation_stream<F>(&self, on_chunk: F) -> Result<(), FMError>
pub fn explanation_stream<F>(&self, on_chunk: F) -> Result<(), FMError>
Trait Implementations§
impl StructuralPartialEq for Refusal
Auto Trait Implementations§
impl Freeze for Refusal
impl RefUnwindSafe for Refusal
impl Send for Refusal
impl Sync for Refusal
impl Unpin for Refusal
impl UnsafeUnpin for Refusal
impl UnwindSafe for Refusal
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