pub struct DangerousClient { /* private fields */ }Expand description
Implementations§
Source§impl DangerousClient
impl DangerousClient
Sourcepub fn new(claude: Claude) -> Result<Self>
pub fn new(claude: Claude) -> Result<Self>
Wrap claude, refusing to construct unless the ALLOW_ENV
env-var equals "1".
The check is made at each construction rather than memoized so that a test which flips the env-var mid-process sees the change.
Sourcepub fn claude(&self) -> &Claude
pub fn claude(&self) -> &Claude
Borrow the underlying Claude for composition with other
wrapper APIs.
Sourcepub async fn query_bypass(&self, cmd: QueryCommand) -> Result<CommandOutput>
pub async fn query_bypass(&self, cmd: QueryCommand) -> Result<CommandOutput>
Run cmd with --permission-mode bypassPermissions
unconditionally overridden. Any permission mode the caller
already set on cmd is replaced.
Trait Implementations§
Source§impl Clone for DangerousClient
impl Clone for DangerousClient
Source§fn clone(&self) -> DangerousClient
fn clone(&self) -> DangerousClient
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for DangerousClient
impl RefUnwindSafe for DangerousClient
impl Send for DangerousClient
impl Sync for DangerousClient
impl Unpin for DangerousClient
impl UnsafeUnpin for DangerousClient
impl UnwindSafe for DangerousClient
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