pub struct NapiConfig {
pub binary_name: Option<String>,
pub package_name: Option<String>,
pub targets: Vec<String>,
}Expand description
The NAPI-RS napi block of a package.json, used to recognize the
per-platform artifact packages a native addon generates so they are not
reported as unused dependencies. All fields deserialize leniently: a
wrong-typed value becomes None/empty instead of failing manifest parsing.
Fields§
§binary_name: Option<String>The binaryName field: basename of the generated .node binary.
package_name: Option<String>The packageName field: base npm package name from which per-platform
artifact package names (<name>-<triple>) are derived.
targets: Vec<String>The targets field: platform triples the addon is built for.
Trait Implementations§
Source§impl Clone for NapiConfig
impl Clone for NapiConfig
Source§impl Debug for NapiConfig
impl Debug for NapiConfig
Source§impl Default for NapiConfig
impl Default for NapiConfig
Source§impl<'de> Deserialize<'de> for NapiConfig
impl<'de> Deserialize<'de> for NapiConfig
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
Auto Trait Implementations§
impl Freeze for NapiConfig
impl RefUnwindSafe for NapiConfig
impl Send for NapiConfig
impl Sync for NapiConfig
impl Unpin for NapiConfig
impl UnsafeUnpin for NapiConfig
impl UnwindSafe for NapiConfig
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