forked from M-Labs/rust-fatfs
Improve OemCpConverter and TimeProvider docs
This commit is contained in:
parent
881cf7709d
commit
759758c1f2
@ -300,7 +300,7 @@ impl FsInfoSector {
|
||||
/// A FAT filesystem mount options.
|
||||
///
|
||||
/// Options are specified as an argument for `FileSystem::new` method.
|
||||
//#[derive(Copy, Clone, Debug)]
|
||||
//FIXME: #[derive(Copy, Clone, Debug)]
|
||||
pub struct FsOptions {
|
||||
pub(crate) update_accessed_date: bool,
|
||||
pub(crate) oem_cp_converter: &'static OemCpConverter,
|
||||
@ -726,6 +726,7 @@ impl<'a, T: ReadWriteSeek> Seek for DiskSlice<'a, T> {
|
||||
///
|
||||
/// Provides a custom implementation for a short name encoding/decoding.
|
||||
/// Default implementation changes all non-ASCII characters to the replacement character (U+FFFD).
|
||||
/// `OemCpConverter` is specified by the `oem_cp_converter` property in `FsOptions` struct.
|
||||
pub trait OemCpConverter {
|
||||
fn decode(&self, oem_char: u8) -> char;
|
||||
fn encode(&self, uni_char: char) -> Option<u8>;
|
||||
|
@ -128,6 +128,7 @@ impl From<chrono::DateTime<Local>> for DateTime {
|
||||
/// Provides a custom implementation for a time resolution used when updating directory entry time fields.
|
||||
/// Default implementation gets time from `chrono` crate if `chrono` feature is enabled.
|
||||
/// Otherwise default implementation returns DOS minimal date-time (1980/1/1 0:00:00).
|
||||
/// `TimeProvider` is specified by the `time_provider` property in `FsOptions` struct.
|
||||
pub trait TimeProvider {
|
||||
fn get_current_date(&self) -> Date;
|
||||
fn get_current_date_time(&self) -> DateTime;
|
||||
|
Loading…
Reference in New Issue
Block a user