hermes_runtime_components/traits/fs/
write_file.rs

1use cgp::prelude::*;
2
3use crate::traits::fs::file_path::HasFilePathType;
4
5#[derive_component(StringToFileWriterComponent, StringToFileWriter<Runtime>)]
6#[async_trait]
7pub trait CanWriteStringToFile: HasFilePathType + HasErrorType {
8    async fn write_string_to_file(
9        &self,
10        path: &Self::FilePath,
11        content: &str,
12    ) -> Result<(), Self::Error>;
13}