pub struct Layout {
pub installers_tag: Option<String>,
/* private fields */
}Fields§
§installers_tag: Option<String>Emulated composer/installers tag, if the plugin is active.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn vendor_only(project_dir: &Path, lock: &Lock, with_dev: bool) -> Layout
pub fn vendor_only(project_dir: &Path, lock: &Lock, with_dev: bool) -> Layout
Everything in vendor/ (no layout plugin), for tests and code paths that have no plugin-aware lock.
Sourcepub fn vendor_only_with(
project_dir: &Path,
lock: &Lock,
with_dev: bool,
dirs: Dirs,
) -> Layout
pub fn vendor_only_with( project_dir: &Path, lock: &Lock, with_dev: bool, dirs: Dirs, ) -> Layout
vendor_only under the given config.vendor-dir / bin-dir.
Sourcepub fn resolve(
project_dir: &Path,
lock: &Lock,
manifest: &Value,
with_dev: bool,
plugins_enabled: bool,
) -> Result<Layout, Vec<String>>
pub fn resolve( project_dir: &Path, lock: &Lock, manifest: &Value, with_dev: bool, plugins_enabled: bool, ) -> Result<Layout, Vec<String>>
The full pass: plugin, allow-plugins, paths, refused targets, and the removal plan for installed.json packages that went away.
pub fn root(&self) -> &Path
pub fn dirs(&self) -> &Dirs
Sourcepub fn vendor_dir(&self) -> PathBuf
pub fn vendor_dir(&self) -> PathBuf
<root>/<vendor-dir> (not canonicalised).
Sourcepub fn composer_dir(&self) -> PathBuf
pub fn composer_dir(&self) -> PathBuf
<root>/<vendor-dir>/composer.
Sourcepub fn root_install_path(&self) -> String
pub fn root_install_path(&self) -> String
The root package’s install_path in installed.php: relative to
<vendor-dir>/composer like the packages’ ('../../' by default).
Sourcepub fn rel(&self, name: &str) -> Option<&str>
pub fn rel(&self, name: &str) -> Option<&str>
Project-relative path (None: metapackage or unknown package).
Sourcepub fn package_root(&self, name: &str) -> Option<PathBuf>
pub fn package_root(&self, name: &str) -> Option<PathBuf>
Root to empty before laying out the package: vendor/<name>
(target-dir included) for LibraryInstaller, the target itself otherwise.
Sourcepub fn install_path(&self, name: &str) -> Option<String>
pub fn install_path(&self, name: &str) -> Option<String>
install-path of installed.json / installed.php: relative to
vendor/composer (findShortestPath($repoDir, $path, true)).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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