pub struct SequentialText {
pub text: Vec<u8>,
}Expand description
Structured representation of sequential text files on disk.
Before using directly consider using DiskFS traits.
For random access text use fs::Records.
Fields§
§text: Vec<u8>Trait Implementations§
Source§impl DiskStruct for SequentialText
impl DiskStruct for SequentialText
Source§fn from_bytes(dat: &[u8]) -> Result<Self, DiskStructError>
fn from_bytes(dat: &[u8]) -> Result<Self, DiskStructError>
Create structure using flattened bytes (typically from disk)
Source§fn update_from_bytes(&mut self, dat: &[u8]) -> Result<(), DiskStructError>
fn update_from_bytes(&mut self, dat: &[u8]) -> Result<(), DiskStructError>
Update with flattened bytes (useful mostly as a crutch within a2kit_macro)
Source§fn from_bytes_adv(
bytes: &[u8],
ptr: &mut usize,
) -> Result<Self, DiskStructError>where
Self: Sized,
fn from_bytes_adv(
bytes: &[u8],
ptr: &mut usize,
) -> Result<Self, DiskStructError>where
Self: Sized,
convenience function to call
from_bytes and increment ptr by len()Source§impl Display for SequentialText
Allows the text to be displayed to the console using println!. This also
derives to_string, so the structure can be converted to String.
This changes CR to LF, and nulls out negative ASCII.
impl Display for SequentialText
Allows the text to be displayed to the console using println!. This also
derives to_string, so the structure can be converted to String.
This changes CR to LF, and nulls out negative ASCII.
Source§impl FromStr for SequentialText
Allows the structure to be created from string slices using from_str.
This will convert LF/CRLF to CR. Negative ASCII is an error.
impl FromStr for SequentialText
Allows the structure to be created from string slices using from_str.
This will convert LF/CRLF to CR. Negative ASCII is an error.
Auto Trait Implementations§
impl Freeze for SequentialText
impl RefUnwindSafe for SequentialText
impl Send for SequentialText
impl Sync for SequentialText
impl Unpin for SequentialText
impl UnsafeUnpin for SequentialText
impl UnwindSafe for SequentialText
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