pub struct Local_file_identifier_type(/* private fields */);
Expand description
Local file type
This type is used to identify an opened file in a file system.
It is used for the file identification between the file system and the virtual file system.
It is a wrapper around a tuple of Task_identifier_type
and File_identifier_type
.
It is unique from the file system point of view.
§Example
use File_system::{Local_file_identifier_type, File_identifier_type, File_system_identifier_type, Unique_file_identifier_type};
use Task::Task_identifier_type;
let Identifier = Local_file_identifier_type::New(
Task_identifier_type::from(0x1234),
File_identifier_type::from(0x5678),
);
let (Task, File) = Identifier.Split();
assert_eq!(Task, Task_identifier_type::from(0x1234));
assert_eq!(File, File_identifier_type::from(0x5678));
let Minimum = Local_file_identifier_type::Get_minimum(Task);
assert_eq!(Minimum, Local_file_identifier_type::New(Task, File_identifier_type::Minimum));
let Maximum = Local_file_identifier_type::Get_maximum(Task);
assert_eq!(Maximum, Local_file_identifier_type::New(Task, File_identifier_type::Maximum));
let (Task, Unique_file_identifier) = Identifier.Into_unique_file_identifier(File_system_identifier_type::from(0x9ABC));
assert_eq!(Task, Task_identifier_type::from(0x1234));
assert_eq!(Unique_file_identifier, Unique_file_identifier_type::New(File_system_identifier_type::from(0x9ABC), File_identifier_type::from(0x5678)));
Implementations§
Source§impl Local_file_identifier_type
impl Local_file_identifier_type
pub const fn New(Task: Task_identifier_type, File: File_identifier_type) -> Self
pub const fn Split(self) -> (Task_identifier_type, File_identifier_type)
pub const fn Get_minimum(Task: Task_identifier_type) -> Self
pub const fn Get_maximum(Task: Task_identifier_type) -> Self
pub const fn Into_unique_file_identifier( self, File_system: File_system_identifier_type, ) -> (Task_identifier_type, Unique_file_identifier_type)
pub const fn Into_inner(self) -> usize
Trait Implementations§
Source§impl Add<usize> for Local_file_identifier_type
impl Add<usize> for Local_file_identifier_type
Source§impl AddAssign<usize> for Local_file_identifier_type
impl AddAssign<usize> for Local_file_identifier_type
Source§fn add_assign(&mut self, rhs: usize)
fn add_assign(&mut self, rhs: usize)
Performs the
+=
operation. Read moreSource§impl Clone for Local_file_identifier_type
impl Clone for Local_file_identifier_type
Source§fn clone(&self) -> Local_file_identifier_type
fn clone(&self) -> Local_file_identifier_type
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Local_file_identifier_type
impl Debug for Local_file_identifier_type
Source§impl Hash for Local_file_identifier_type
impl Hash for Local_file_identifier_type
Source§impl Ord for Local_file_identifier_type
impl Ord for Local_file_identifier_type
Source§fn cmp(&self, other: &Local_file_identifier_type) -> Ordering
fn cmp(&self, other: &Local_file_identifier_type) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Local_file_identifier_type
impl PartialOrd for Local_file_identifier_type
impl Copy for Local_file_identifier_type
impl Eq for Local_file_identifier_type
impl StructuralPartialEq for Local_file_identifier_type
Auto Trait Implementations§
impl Freeze for Local_file_identifier_type
impl RefUnwindSafe for Local_file_identifier_type
impl Send for Local_file_identifier_type
impl Sync for Local_file_identifier_type
impl Unpin for Local_file_identifier_type
impl UnwindSafe for Local_file_identifier_type
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