pub struct Lockfile {
pub version: u32,
pub core: String,
pub components: Vec<LockComponent>,
}Expand description
Содержимое light.lock.
Fields§
§version: u32Версия формата.
core: StringВерсия ядра, под которую зафиксированы компоненты.
components: Vec<LockComponent>Зафиксированные компоненты.
Implementations§
Source§impl Lockfile
impl Lockfile
Sourcepub fn to_toml(&self) -> Result<String>
pub fn to_toml(&self) -> Result<String>
Сериализует lock-файл в TOML-текст (с заголовком-комментарием).
Sourcepub fn from_project(project_root: &Path) -> Result<Lockfile>
pub fn from_project(project_root: &Path) -> Result<Lockfile>
Строит lock-файл из текущего Cargo.toml проекта.
Sourcepub fn same_components(&self, other: &Lockfile) -> bool
pub fn same_components(&self, other: &Lockfile) -> bool
Сравнивает set компонентов (имя+версия) с другим lock-файлом.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lockfile
impl<'de> Deserialize<'de> for Lockfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Lockfile
impl StructuralPartialEq for Lockfile
Auto Trait Implementations§
impl Freeze for Lockfile
impl RefUnwindSafe for Lockfile
impl Send for Lockfile
impl Sync for Lockfile
impl Unpin for Lockfile
impl UnsafeUnpin for Lockfile
impl UnwindSafe for Lockfile
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.