pub struct LockFile {
pub schema_version: u32,
pub resources: BTreeMap<String, LockedResource>,
pub metadata: Metadata,
}Fields§
§schema_version: u32§resources: BTreeMap<String, LockedResource>§metadata: MetadataImplementations§
Source§impl LockFile
impl LockFile
pub fn upsert(&mut self, resource: impl Into<String>, locked: LockedResource)
pub fn to_json(&self) -> Result<String>
pub fn from_json(data: &str) -> Result<Self>
pub fn to_text_with<C: TextCodec>(&self, codec: &C) -> Result<String>
pub fn from_text_with<C: TextCodec>(codec: &C, data: &str) -> Result<Self>
pub fn from_json_validated(data: &str) -> Result<Self>
pub fn validate(&self) -> Result<()>
pub fn diff(&self, target: &Self) -> LockDiff
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