pub struct ConsentPrompt {
pub provider: &'static str,
pub api_endpoint: &'static str,
}Expand description
Configuration for API consent prompt
Fields§
§provider: &'static strProvider name (e.g., “Anthropic”, “OpenAI”)
api_endpoint: &'static strAPI endpoint URL (for transparency)
Implementations§
Source§impl ConsentPrompt
impl ConsentPrompt
Sourcepub fn ask(&self) -> Result<bool, TokenError>
pub fn ask(&self) -> Result<bool, TokenError>
Ask user for consent (interactive mode only)
Returns Ok(true) if user consents, Ok(false) if user declines.
Returns Err if running in non-interactive mode (stdin not a TTY).
Auto Trait Implementations§
impl Freeze for ConsentPrompt
impl RefUnwindSafe for ConsentPrompt
impl Send for ConsentPrompt
impl Sync for ConsentPrompt
impl Unpin for ConsentPrompt
impl UnsafeUnpin for ConsentPrompt
impl UnwindSafe for ConsentPrompt
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