Struct naromat::entities::text_file::TextFile [−][src]
Structure of Novel text file
Implementations
impl<'file_handling> TextFile
[src]
Implementation for novel text structure
pub fn new(path_from: &str) -> Result<Self, Box<dyn Error + 'static>>
[src]
Constructor
Fail
- Path format is invalid
- A file designated by a path is not exists
Example
use naromat::entities::text_file::TextFile; TextFile::new("./path/to/source/file.txt").unwrap();
pub fn format_and_save(
self,
path_to: &'file_handling str
) -> Result<(), TextFileOutputError<'_>>
[src]
self,
path_to: &'file_handling str
) -> Result<(), TextFileOutputError<'_>>
Format file text and save
Return true if save was succeed
Return false if save was failed
Example
use naromat::entities::text_file::TextFile; let text = TextFile::new("./path/to/source/file.txt").unwrap(); text.format_and_save("./path/to/save.txt");
Auto Trait Implementations
impl RefUnwindSafe for TextFile
impl Send for TextFile
impl Sync for TextFile
impl Unpin for TextFile
impl UnwindSafe for TextFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,