Struct leo_retriever::retriever::Retriever
source · pub struct Retriever<N: Network> {
name: Symbol,
contexts: IndexMap<Symbol, ProgramContext>,
project_path: PathBuf,
registry_path: PathBuf,
endpoint: String,
phantom: PhantomData<N>,
}
Fields§
§name: Symbol
§contexts: IndexMap<Symbol, ProgramContext>
§project_path: PathBuf
§registry_path: PathBuf
§endpoint: String
§phantom: PhantomData<N>
Implementations§
source§impl<N: Network> Retriever<N>
impl<N: Network> Retriever<N>
pub fn new( name: Symbol, path: &PathBuf, home: &Path, endpoint: String, ) -> Result<Self, UtilError>
pub fn get_context(&self, name: &Symbol) -> &ProgramContext
pub fn retrieve(&mut self) -> Result<Vec<Symbol>, UtilError>
pub fn prepare_local( &mut self, name: Symbol, ) -> Result<(PathBuf, IndexMap<Symbol, Stub>), UtilError>
pub fn process_local( &mut self, name: Symbol, recursive: bool, ) -> Result<(), UtilError>
fn write_lock_file(&self, name: &Symbol) -> Result<(), UtilError>
Auto Trait Implementations§
impl<N> Freeze for Retriever<N>
impl<N> RefUnwindSafe for Retriever<N>where
N: RefUnwindSafe,
impl<N> Send for Retriever<N>
impl<N> Sync for Retriever<N>
impl<N> Unpin for Retriever<N>where
N: Unpin,
impl<N> UnwindSafe for Retriever<N>where
N: 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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