pub struct P9Server { /* private fields */ }Expand description
Manages the port-564 9P2000.L listener and active exports.
Implementations§
Source§impl P9Server
impl P9Server
pub fn attach( vsock: &Arc<VsockHost>, monitor: Option<Arc<Monitor>>, ) -> Arc<Self> ⓘ
pub fn add_export( &self, host_dir: &Path, guest_path: &str, read_only: bool, ) -> Result<Arc<ExportSpec>>
Sourcepub fn mount_in_guest(
&self,
vsock: &Arc<VsockHost>,
host_dir: &Path,
guest_path: &str,
read_only: bool,
timeout_ms: u64,
) -> Result<()>
pub fn mount_in_guest( &self, vsock: &Arc<VsockHost>, host_dir: &Path, guest_path: &str, read_only: bool, timeout_ms: u64, ) -> Result<()>
Mount host_dir inside the guest at guest_path by registering the 9p export and
running /usr/bin/kwbox 9p <export> <guest_path> [ro] as root via kwtty.
Sourcepub fn mount_in_guest_ext(
&self,
vsock: &Arc<VsockHost>,
host_dir: &Path,
guest_path: &str,
read_only: bool,
copy_on_write: bool,
initial_snapshot: Option<&WorkspaceSnapshot>,
timeout_ms: u64,
) -> Result<()>
pub fn mount_in_guest_ext( &self, vsock: &Arc<VsockHost>, host_dir: &Path, guest_path: &str, read_only: bool, copy_on_write: bool, initial_snapshot: Option<&WorkspaceSnapshot>, timeout_ms: u64, ) -> Result<()>
Mount host_dir in copy-on-write (:cow) mode, optionally seeded from a WorkspaceSnapshot.
pub fn diff_workspace(&self, guest_path: &str) -> Result<WorkspaceDiff>
pub fn diff_all_cow_workspaces(&self) -> Vec<WorkspaceDiff>
pub fn snapshot_workspace(&self, guest_path: &str) -> Result<WorkspaceSnapshot>
pub fn snapshot_all_workspaces(&self) -> Vec<WorkspaceSnapshot>
pub fn read_workspace_file( &self, guest_path: &str, rel_path: &str, ) -> Result<Option<Vec<u8>>>
pub fn commit_workspace(&self, guest_path: &str) -> Result<WorkspaceDiff>
pub fn discard_workspace(&self, guest_path: &str) -> Result<()>
Auto Trait Implementations§
impl !Freeze for P9Server
impl !RefUnwindSafe for P9Server
impl !UnwindSafe for P9Server
impl Forget for P9Server
impl Move for P9Server
impl Send for P9Server
impl Sync for P9Server
impl Unpin for P9Server
impl UnsafeUnpin for P9Serverwhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, Arc<ExportSpec>)>: UnsafeUnpin,
*const ArcInner<Monitor> is !null: UnsafeUnpin,
PhantomData<ArcInner<Monitor>>: UnsafeUnpin,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more