Struct deno_node::PackageJson
source · [−]pub struct PackageJson {
pub exists: bool,
pub exports: Option<Map<String, Value>>,
pub imports: Option<Map<String, Value>>,
pub bin: Option<Value>,
pub name: Option<String>,
pub version: Option<String>,
pub path: PathBuf,
pub typ: String,
pub types: Option<String>,
/* private fields */
}
Fields
exists: bool
exports: Option<Map<String, Value>>
imports: Option<Map<String, Value>>
bin: Option<Value>
name: Option<String>
version: Option<String>
path: PathBuf
typ: String
types: Option<String>
Implementations
sourceimpl PackageJson
impl PackageJson
pub fn empty(path: PathBuf) -> PackageJson
pub fn load(
resolver: &dyn RequireNpmResolver,
path: PathBuf
) -> Result<PackageJson, AnyError>
pub fn main(&self, referrer_kind: NodeModuleKind) -> Option<&String>
Trait Implementations
sourceimpl Clone for PackageJson
impl Clone for PackageJson
sourcefn clone(&self) -> PackageJson
fn clone(&self) -> PackageJson
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for PackageJson
impl Debug for PackageJson
sourceimpl Serialize for PackageJson
impl Serialize for PackageJson
Auto Trait Implementations
impl RefUnwindSafe for PackageJson
impl Send for PackageJson
impl Sync for PackageJson
impl Unpin for PackageJson
impl UnwindSafe for PackageJson
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more