pub struct File { /* private fields */ }Implementations§
source§impl File
impl File
pub fn set_path(&mut self, path: String)
sourcepub fn get_content(&mut self) -> Result<()>
pub fn get_content(&mut self) -> Result<()>
Gets the content from the specified file and introduces it as a String in the content attribute Returns a result in case the file name doesn’t exist or the path attribute is empty
sourcepub fn print_content(&self) -> Result<String>
pub fn print_content(&self) -> Result<String>
Prints the content as is
sourcepub fn print_reverse(&self) -> Result<String>
pub fn print_reverse(&self) -> Result<String>
Prints the content reversing both lines and characters
sourcepub fn print_lines_reverse(&self) -> Result<String>
pub fn print_lines_reverse(&self) -> Result<String>
Prints the content reversing only the lines
sourcepub fn print_chars_reverse(&self) -> Result<String>
pub fn print_chars_reverse(&self) -> Result<String>
Prints the content reversing only the characters within the lines
Trait Implementations§
source§impl Ord for File
impl Ord for File
source§impl PartialEq for File
impl PartialEq for File
source§impl PartialOrd for File
impl PartialOrd for File
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for File
impl StructuralEq for File
impl StructuralPartialEq for File
Auto Trait Implementations§
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
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