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
sourceimpl 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, metadata21: &Metadata21) -> Result<()>
pub fn write_record(self, metadata21: &Metadata21) -> Result<()>
Writes the RECORD file after everything else has been written
Trait Implementations
sourceimpl ModuleWriter for PathWriter
impl ModuleWriter for PathWriter
sourcefn 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
sourcefn 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 Read more
sourcefn 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 RefUnwindSafe for PathWriter
impl Send for PathWriter
impl Sync for PathWriter
impl Unpin for PathWriter
impl UnwindSafe for PathWriter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more