pub struct Rust<R: Retriever> { /* private fields */ }
Expand description
Rust dependency collector.
It will parse the content of the Cargo.lock
file and get information about the dependencies.
Implementations§
Source§impl Rust<DocsRs>
impl Rust<DocsRs>
Sourcepub fn with_docs_rs_retriever(client: Client, store: Arc<Option<Store>>) -> Self
pub fn with_docs_rs_retriever(client: Client, store: Arc<Option<Store>>) -> Self
Creates a new Rust
FileCollector
that uses a retriever::DocsRs
.
It’s basically sintactic sugar to save you from instantiating the retriever::DocsRs
.
Trait Implementations§
Source§impl<R: Retriever> FileCollector for Rust<R>
impl<R: Retriever> FileCollector for Rust<R>
Source§fn get_dependency_filename(&self) -> String
fn get_dependency_filename(&self) -> String
Gets the name of the file holding all the dependencies.
i.e. for npm package-lock.json, for rust cargo.lock
Source§fn get_dependencies(
&self,
dependency_file_content: &str,
licrc: &LicRc,
) -> RetrievedDependencyStreamResult<'_>
fn get_dependencies( &self, dependency_file_content: &str, licrc: &LicRc, ) -> RetrievedDependencyStreamResult<'_>
Returns a stream of
RetrievedDependency
ready to be validated.
It accepts a &str with the content of the dependency file
and a function to filter the dependencies that we don’t want to process,
mainly because the user has expressed the will to not to do so. Read moreAuto Trait Implementations§
impl<R> Freeze for Rust<R>where
R: Freeze,
impl<R> RefUnwindSafe for Rust<R>where
R: RefUnwindSafe,
impl<R> Send for Rust<R>
impl<R> Sync for Rust<R>
impl<R> Unpin for Rust<R>where
R: Unpin,
impl<R> UnwindSafe for Rust<R>where
R: UnwindSafe,
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 more