pub struct Doctor<'a> { /* private fields */ }Expand description
doctor runner.
Implementations§
Source§impl<'a> Doctor<'a>
impl<'a> Doctor<'a>
Sourcepub fn new(
store: Arc<dyn ObjectStore>,
prefix: impl Into<String>,
opts: DoctorOpts,
prompter: &'a dyn Prompter,
) -> Self
pub fn new( store: Arc<dyn ObjectStore>, prefix: impl Into<String>, opts: DoctorOpts, prompter: &'a dyn Prompter, ) -> Self
Construct a new runner. prefix is the parsed remote URL’s
repository prefix without a trailing /. Pass an empty string
for repositories stored at the bucket/container root.
Sourcepub async fn run(&self) -> Result<(), ManageError>
pub async fn run(&self) -> Result<(), ManageError>
Analyze, report, and fix — writing human-readable output to stdout.
Thin wrapper around run_into that passes
std::io::stdout(). Each write acquires the stdout lock
individually, keeping the returned future Send. Use
run_into directly when you need to capture output (e.g. in
tests).
§Errors
Returns ManageError::Store if an object-store call fails,
ManageError::Internal if a prompter returns an out-of-range
index, ManageError::Cancelled if the user cancels an interactive
prompt, or ManageError::Io for prompt or write I/O failures.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Doctor<'a>
impl<'a> !UnwindSafe for Doctor<'a>
impl<'a> Freeze for Doctor<'a>
impl<'a> Send for Doctor<'a>
impl<'a> Sync for Doctor<'a>
impl<'a> Unpin for Doctor<'a>
impl<'a> UnsafeUnpin for Doctor<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.