Struct cargo::sources::path::PathSource [−][src]
Implementations
impl<'cfg> PathSource<'cfg>
[src]
pub fn new(
path: &Path,
source_id: SourceId,
config: &'cfg Config
) -> PathSource<'cfg>
[src]
path: &Path,
source_id: SourceId,
config: &'cfg Config
) -> PathSource<'cfg>
Invoked with an absolute path to a directory that contains a Cargo.toml
.
This source will only return the package at precisely the path
specified, and it will be an error if there’s not a package at path
.
pub fn new_recursive(
root: &Path,
id: SourceId,
config: &'cfg Config
) -> PathSource<'cfg>
[src]
root: &Path,
id: SourceId,
config: &'cfg Config
) -> PathSource<'cfg>
Creates a new source which is walked recursively to discover packages.
This is similar to the new
method except that instead of requiring a
valid package to be present at root
the folder is walked entirely to
crawl for packages.
Note that this should be used with care and likely shouldn’t be chosen by default!
pub fn preload_with(&mut self, pkg: Package)
[src]
pub fn root_package(&mut self) -> CargoResult<Package>
[src]
pub fn read_packages(&self) -> CargoResult<Vec<Package>>
[src]
pub fn list_files(&self, pkg: &Package) -> CargoResult<Vec<PathBuf>>
[src]
List all files relevant to building this package inside this source.
This function will use the appropriate methods to determine the
set of files underneath this source’s directory which are relevant for
building pkg
.
The basic assumption of this method is that all files in the directory are relevant for building this package, but it also contains logic to use other methods like .gitignore to filter the list of files.
pub fn last_modified_file(
&self,
pkg: &Package
) -> CargoResult<(FileTime, PathBuf)>
[src]
&self,
pkg: &Package
) -> CargoResult<(FileTime, PathBuf)>
pub fn path(&self) -> &Path
[src]
Trait Implementations
impl<'cfg> Debug for PathSource<'cfg>
[src]
impl<'cfg> Source for PathSource<'cfg>
[src]
fn query(
&mut self,
dep: &Dependency,
f: &mut dyn FnMut(Summary)
) -> CargoResult<()>
[src]
&mut self,
dep: &Dependency,
f: &mut dyn FnMut(Summary)
) -> CargoResult<()>
fn fuzzy_query(
&mut self,
_dep: &Dependency,
f: &mut dyn FnMut(Summary)
) -> CargoResult<()>
[src]
&mut self,
_dep: &Dependency,
f: &mut dyn FnMut(Summary)
) -> CargoResult<()>
fn supports_checksums(&self) -> bool
[src]
fn requires_precise(&self) -> bool
[src]
fn source_id(&self) -> SourceId
[src]
fn update(&mut self) -> CargoResult<()>
[src]
fn download(&mut self, id: PackageId) -> CargoResult<MaybePackage>
[src]
fn finish_download(
&mut self,
_id: PackageId,
_data: Vec<u8>
) -> CargoResult<Package>
[src]
&mut self,
_id: PackageId,
_data: Vec<u8>
) -> CargoResult<Package>
fn fingerprint(&self, pkg: &Package) -> CargoResult<String>
[src]
fn describe(&self) -> String
[src]
fn add_to_yanked_whitelist(&mut self, _pkgs: &[PackageId])
[src]
fn is_yanked(&mut self, _pkg: PackageId) -> CargoResult<bool>
[src]
fn replaced_source_id(&self) -> SourceId
[src]
fn query_vec(&mut self, dep: &Dependency) -> CargoResult<Vec<Summary>>
[src]
fn download_now(
self: Box<Self>,
package: PackageId,
config: &Config
) -> CargoResult<Package> where
Self: Sized,
[src]
self: Box<Self>,
package: PackageId,
config: &Config
) -> CargoResult<Package> where
Self: Sized,
fn verify(&self, _pkg: PackageId) -> CargoResult<()>
[src]
fn is_replaced(&self) -> bool
[src]
Auto Trait Implementations
impl<'cfg> !RefUnwindSafe for PathSource<'cfg>
impl<'cfg> !Send for PathSource<'cfg>
impl<'cfg> !Sync for PathSource<'cfg>
impl<'cfg> Unpin for PathSource<'cfg>
impl<'cfg> !UnwindSafe for PathSource<'cfg>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,