pub struct EbuildTempRepo { /* private fields */ }Expand description
A temporary repo that is automatically deleted when it goes out of scope.
Implementations§
Source§impl EbuildTempRepo
impl EbuildTempRepo
pub fn path(&self) -> &Utf8Path
Sourcepub fn create_ebuild<T>(
&mut self,
value: T,
data: &[&str],
) -> Result<Utf8PathBuf>
pub fn create_ebuild<T>( &mut self, value: T, data: &[&str], ) -> Result<Utf8PathBuf>
Create an ebuild using custom data field values.
Sourcepub fn create_ebuild_from_str<T>(
&mut self,
value: T,
data: &str,
) -> Result<Utf8PathBuf>
pub fn create_ebuild_from_str<T>( &mut self, value: T, data: &str, ) -> Result<Utf8PathBuf>
Create an ebuild file in the repo from raw data.
Sourcepub fn create_eclass(&mut self, name: &str, data: &str) -> Result<Utf8PathBuf>
pub fn create_eclass(&mut self, name: &str, data: &str) -> Result<Utf8PathBuf>
Create an eclass in the repo.
Sourcepub fn persist<P: AsRef<Utf8Path>>(self, path: Option<P>) -> Result<Utf8PathBuf>
pub fn persist<P: AsRef<Utf8Path>>(self, path: Option<P>) -> Result<Utf8PathBuf>
Persist the temporary repo to disk, returning the Utf8PathBuf where it is located.
Trait Implementations§
Source§impl AsRef<OsStr> for EbuildTempRepo
impl AsRef<OsStr> for EbuildTempRepo
Source§impl AsRef<Path> for EbuildTempRepo
impl AsRef<Path> for EbuildTempRepo
Source§impl Debug for EbuildTempRepo
impl Debug for EbuildTempRepo
Source§impl From<&EbuildTempRepo> for Repo
impl From<&EbuildTempRepo> for Repo
Source§fn from(repo: &EbuildTempRepo) -> Self
fn from(repo: &EbuildTempRepo) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EbuildTempRepo
impl RefUnwindSafe for EbuildTempRepo
impl Send for EbuildTempRepo
impl Sync for EbuildTempRepo
impl Unpin for EbuildTempRepo
impl UnwindSafe for EbuildTempRepo
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