pub struct PackageViewMut<'a> { /* private fields */ }Expand description
Mutable view over a (package ...) node.
Implementations§
Source§impl PackageViewMut<'_>
impl PackageViewMut<'_>
pub fn set_field(&mut self, name: &str, value: Node)
pub fn field_mut(&mut self, name: &str) -> Option<&mut Node>
pub fn set_version(&mut self, version: &str)
Sourcepub fn set_origin_sha256_base32(&mut self, hash: &str) -> bool
pub fn set_origin_sha256_base32(&mut self, hash: &str) -> bool
Replaces the base32 string in place. false when the package
does not have the source -> origin -> sha256 -> base32 shape.
Sourcepub fn replace_input(&mut self, old: &str, new: &str) -> bool
pub fn replace_input(&mut self, old: &str, new: &str) -> bool
Swaps a symbol in list-style inputs (also native/propagated).
Auto Trait Implementations§
impl<'a> !UnwindSafe for PackageViewMut<'a>
impl<'a> Freeze for PackageViewMut<'a>
impl<'a> RefUnwindSafe for PackageViewMut<'a>
impl<'a> Send for PackageViewMut<'a>
impl<'a> Sync for PackageViewMut<'a>
impl<'a> Unpin for PackageViewMut<'a>
impl<'a> UnsafeUnpin for PackageViewMut<'a>
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