pub struct AppContext {
pub manifest_path: PathBuf,
pub manifest_dir: PathBuf,
pub workspace_root: PathBuf,
pub target_directory: PathBuf,
pub package_id: String,
pub package_name: String,
pub package_version: String,
pub lib_name: String,
pub has_web_feature: bool,
pub has_lockfile: bool,
pub host_modules: Vec<String>,
pub path_deps: Vec<PathBuf>,
}Expand description
Resolved NV app crate metadata including transitive [package.metadata.nativeview] host_module names
and transitive non-dev path-dependency package directories.
Fields§
§manifest_path: PathBuf§manifest_dir: PathBuf§workspace_root: PathBuf§target_directory: PathBuf§package_id: String§package_name: String§package_version: String§lib_name: String§has_web_feature: bool§has_lockfile: bool§host_modules: Vec<String>§path_deps: Vec<PathBuf>Implementations§
Source§impl AppContext
impl AppContext
pub fn manifest_app_info(&self) -> ManifestAppInfo
Sourcepub fn dev_session_root(&self, sdk_root: Option<&NvSdkRoot>) -> PathBuf
pub fn dev_session_root(&self, sdk_root: Option<&NvSdkRoot>) -> PathBuf
Root directory used for worktree-scoped nv dev session discovery (session.json):
shares sdk_root for in-SDK apps (including standalone [workspace] examples) so
nv dev wait / nv dev status find the session from either the repo root or example dir,
while external user projects stay scoped to their own workspace_root.
Trait Implementations§
Source§impl Clone for AppContext
impl Clone for AppContext
Source§impl Debug for AppContext
impl Debug for AppContext
impl Eq for AppContext
Source§impl PartialEq for AppContext
impl PartialEq for AppContext
impl StructuralPartialEq for AppContext
Auto Trait Implementations§
impl Forget for AppContext
impl Freeze for AppContextwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<PathBuf>: Freeze,
impl Move for AppContext
impl RefUnwindSafe for AppContext
impl Send for AppContextwhere
RawVecInner: Send,
impl Sync for AppContextwhere
RawVecInner: Sync,
impl Unpin for AppContext
impl UnsafeUnpin for AppContextwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<PathBuf>: UnsafeUnpin,
impl UnwindSafe for AppContextwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.