pub struct Unique_file_identifier_type(/* private fields */);
Expand description
Unique file identifier type
This type is used to identify an opened file in the virtual file system.
It is used for the file identification between the virtual file system and the outside world.
It is similar to a file descriptor in Unix-like systems.
It is a wrapper around a tuple of File_system_identifier_type
and File_identifier_type
.
It is unique from the virtual file system point of view.
§Example
use File_system::{Unique_file_identifier_type, File_identifier_type, File_system_identifier_type, Local_file_identifier_type};
use Task::Task_identifier_type;
let Identifier = Unique_file_identifier_type::New(
File_system_identifier_type::from(0x1234),
File_identifier_type::from(0x5678),
);
let (File_system, File) = Identifier.Split();
assert_eq!(File_system, File_system_identifier_type::from(0x1234));
assert_eq!(File, File_identifier_type::from(0x5678));
let (File_system, Local_file) = Identifier.Into_local_file_identifier(Task_identifier_type::from(0x9ABC));
assert_eq!(File_system, File_system_identifier_type::from(0x1234));
assert_eq!(Local_file, Local_file_identifier_type::New(Task_identifier_type::from(0x9ABC), File_identifier_type::from(0x5678)));
Implementations§
Source§impl Unique_file_identifier_type
impl Unique_file_identifier_type
pub const fn New( File_system: File_system_identifier_type, File: File_identifier_type, ) -> Self
pub const fn Split(&self) -> (File_system_identifier_type, File_identifier_type)
pub const fn Into_local_file_identifier( self, Task: Task_identifier_type, ) -> (File_system_identifier_type, Local_file_identifier_type)
pub const fn Into_inner(self) -> usize
Trait Implementations§
Source§impl Clone for Unique_file_identifier_type
impl Clone for Unique_file_identifier_type
Source§fn clone(&self) -> Unique_file_identifier_type
fn clone(&self) -> Unique_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 Unique_file_identifier_type
impl Debug for Unique_file_identifier_type
Source§impl From<Unique_file_identifier_type> for usize
impl From<Unique_file_identifier_type> for usize
Source§fn from(Identifier: Unique_file_identifier_type) -> Self
fn from(Identifier: Unique_file_identifier_type) -> Self
Converts to this type from the input type.
Source§impl From<usize> for Unique_file_identifier_type
impl From<usize> for Unique_file_identifier_type
Source§impl Hash for Unique_file_identifier_type
impl Hash for Unique_file_identifier_type
Source§impl Ord for Unique_file_identifier_type
impl Ord for Unique_file_identifier_type
Source§fn cmp(&self, other: &Unique_file_identifier_type) -> Ordering
fn cmp(&self, other: &Unique_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 Unique_file_identifier_type
impl PartialOrd for Unique_file_identifier_type
impl Copy for Unique_file_identifier_type
impl Eq for Unique_file_identifier_type
impl StructuralPartialEq for Unique_file_identifier_type
Auto Trait Implementations§
impl Freeze for Unique_file_identifier_type
impl RefUnwindSafe for Unique_file_identifier_type
impl Send for Unique_file_identifier_type
impl Sync for Unique_file_identifier_type
impl Unpin for Unique_file_identifier_type
impl UnwindSafe for Unique_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