pub struct RustCrateFetch { /* private fields */ }Expand description
Builder for accessing Rust crate source code
Implementations§
Source§impl RustCrateFetch
impl RustCrateFetch
Sourcepub fn new(name: &str, cwd: impl Into<PathBuf>) -> Self
pub fn new(name: &str, cwd: impl Into<PathBuf>) -> Self
Create a new fetch request for the given crate name
Sourcepub fn version(self, version: &str) -> Self
pub fn version(self, version: &str) -> Self
Specify a version constraint (e.g., “^1.0”, “=1.2.3”)
Sourcepub async fn fetch(self) -> Result<FetchResult>
pub async fn fetch(self) -> Result<FetchResult>
Fetch the crate sources, returning the path to extracted sources
Auto Trait Implementations§
impl Freeze for RustCrateFetch
impl RefUnwindSafe for RustCrateFetch
impl Send for RustCrateFetch
impl Sync for RustCrateFetch
impl Unpin for RustCrateFetch
impl UnwindSafe for RustCrateFetch
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