Struct maturin::PathWriter
source · pub struct PathWriter { /* private fields */ }
Expand description
A ModuleWriter that adds the module somewhere in the filesystem, e.g. in a virtualenv
Implementations§
source§impl PathWriter
impl PathWriter
sourcepub fn venv(
target: &Target,
venv_dir: &Path,
bridge: &BridgeModel
) -> Result<Self>
pub fn venv( target: &Target, venv_dir: &Path, bridge: &BridgeModel ) -> Result<Self>
Creates a ModuleWriter that adds the module to the current virtualenv
sourcepub fn delete_dir(&self, relative: impl AsRef<Path>) -> Result<()>
pub fn delete_dir(&self, relative: impl AsRef<Path>) -> Result<()>
Removes a directory relative to the base path if it exists.
This is to clean up the contents of an older develop call
sourcepub fn write_record(self, metadata23: &Metadata23) -> Result<()>
pub fn write_record(self, metadata23: &Metadata23) -> Result<()>
Writes the RECORD file after everything else has been written
Trait Implementations§
source§impl ModuleWriter for PathWriter
impl ModuleWriter for PathWriter
source§fn add_directory(&mut self, path: impl AsRef<Path>) -> Result<()>
fn add_directory(&mut self, path: impl AsRef<Path>) -> Result<()>
Adds a directory relative to the module base path
source§fn add_bytes_with_permissions(
&mut self,
target: impl AsRef<Path>,
bytes: &[u8],
_permissions: u32
) -> Result<()>
fn add_bytes_with_permissions( &mut self, target: impl AsRef<Path>, bytes: &[u8], _permissions: u32 ) -> Result<()>
Adds a file with bytes as content in target relative to the module base path while setting
the given unix permissions
source§fn add_bytes(&mut self, target: impl AsRef<Path>, bytes: &[u8]) -> Result<()>
fn add_bytes(&mut self, target: impl AsRef<Path>, bytes: &[u8]) -> Result<()>
Adds a file with bytes as content in target relative to the module base path
Auto Trait Implementations§
impl Freeze for PathWriter
impl RefUnwindSafe for PathWriter
impl Send for PathWriter
impl Sync for PathWriter
impl Unpin for PathWriter
impl UnwindSafe for PathWriter
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