pub struct CacheLayout {
pub root_path: Utf8PathBuf,
pub cargo_tomls: Box<[Utf8PathBuf]>,
pub workspaces: Workspaces,
pub packages_info: Box<[CachePackageInfo]>,
pub resolves: Box<[CacheResolve]>,
}Fields§
§root_path: Utf8PathBuf仓库根目录的完整路径,可用于去除 Metadata 中的路径前缀,让路径看起来更清爽
cargo_tomls: Box<[Utf8PathBuf]>所有 Cargo.toml 的路径
NOTE: Cargo.toml 并不意味着对应于一个 package —— virtual workspace 布局无需定义
[package],因此要获取所有 packages 的信息,应使用 [Layout::packages]
workspaces: Workspaces§packages_info: Box<[CachePackageInfo]>The order is by pkg name and dir path.
resolves: Box<[CacheResolve]>Trait Implementations§
Source§impl Debug for CacheLayout
impl Debug for CacheLayout
Source§impl<'__de, __A> Decode<'__de, Binary, __A> for CacheLayoutwhere
__A: Allocator,
impl<'__de, __A> Decode<'__de, Binary, __A> for CacheLayoutwhere
__A: Allocator,
Source§const IS_BITWISE_DECODE: bool = false
const IS_BITWISE_DECODE: bool = false
Whether the type is packed. Packed types can be bitwise copied if the
representation of the serialization format is identical to the memory
layout of the type. Read more
Source§impl<'__de, __A> Decode<'__de, Text, __A> for CacheLayoutwhere
__A: Allocator,
impl<'__de, __A> Decode<'__de, Text, __A> for CacheLayoutwhere
__A: Allocator,
Source§const IS_BITWISE_DECODE: bool = false
const IS_BITWISE_DECODE: bool = false
Whether the type is packed. Packed types can be bitwise copied if the
representation of the serialization format is identical to the memory
layout of the type. Read more
Source§impl Default for CacheLayout
impl Default for CacheLayout
Source§fn default() -> CacheLayout
fn default() -> CacheLayout
Returns the “default value” for a type. Read more
Source§impl Encode<Binary> for CacheLayout
impl Encode<Binary> for CacheLayout
Source§const IS_BITWISE_ENCODE: bool = false
const IS_BITWISE_ENCODE: bool = false
Whether the type is packed. Packed types can be bitwise copied if the
representation of the serialization format is identical to the memory
layout of the type. Read more
Source§type Encode = CacheLayout
type Encode = CacheLayout
The underlying type being encoded. Read more
Source§impl Encode<Text> for CacheLayout
impl Encode<Text> for CacheLayout
Source§const IS_BITWISE_ENCODE: bool = false
const IS_BITWISE_ENCODE: bool = false
Whether the type is packed. Packed types can be bitwise copied if the
representation of the serialization format is identical to the memory
layout of the type. Read more
Source§type Encode = CacheLayout
type Encode = CacheLayout
The underlying type being encoded. Read more
Source§impl Value for CacheLayout
impl Value for CacheLayout
Source§type SelfType<'a> = CacheLayout
where
Self: 'a
type SelfType<'a> = CacheLayout where Self: 'a
SelfType<'a> must be the same type as Self with all lifetimes replaced with ’atype AsBytes<'a> = Vec<u8> where Self: 'a
Source§fn fixed_width() -> Option<usize>
fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width
Source§fn from_bytes<'a>(data: &'a [u8]) -> Self::SelfType<'a>where
Self: 'a,
fn from_bytes<'a>(data: &'a [u8]) -> Self::SelfType<'a>where
Self: 'a,
Deserializes data
Implementations may return a view over data, or an owned type
Auto Trait Implementations§
impl Freeze for CacheLayout
impl RefUnwindSafe for CacheLayout
impl Send for CacheLayout
impl Sync for CacheLayout
impl Unpin for CacheLayout
impl UnwindSafe for CacheLayout
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