pub struct Scripts(/* private fields */);Expand description
A parsed root scripts table: ordered event/alias name → ordered entries.
Order is preserved (Composer runs entries in declaration order, and alias
recursion depends on it), so the backing store is an ordered Vec rather
than a map.
Implementations§
Source§impl Scripts
impl Scripts
Sourcepub fn parse(root_composer_json: &Value) -> Self
pub fn parse(root_composer_json: &Value) -> Self
Parse the root composer.json’s scripts object into classified,
order-preserving entries.
Reads the raw value directly rather than going through
bougie-config’s normaliser, which drops callback/mixed arrays — we
need every entry classified in order, callbacks included. A single
string scripts.<event> is treated as a one-element list, matching
Composer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scripts
impl RefUnwindSafe for Scripts
impl Send for Scripts
impl Sync for Scripts
impl Unpin for Scripts
impl UnsafeUnpin for Scripts
impl UnwindSafe for Scripts
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