redox/kernel/context/file.rs
David Teller d16515ea12 Converting scheme ids into a new type SchemeId
Keeping scheme ids (and pids, and file handles, ...) as usize is a
footgun. Let's remove it.
2016-11-14 07:46:43 +01:00

16 lines
350 B
Rust

//! File struct
use scheme::SchemeId;
/// A file
//TODO: Close on exec
#[derive(Copy, Clone, Debug)]
pub struct File {
/// The scheme that this file refers to
pub scheme: SchemeId,
/// The number the scheme uses to refer to this file
pub number: usize,
/// If events are on, this is the event ID
pub event: Option<usize>,
}