pub struct Status(/* private fields */);
Expand description
The status of a file.
The status is stored in a 8-bit integer, with the following layout:
§| Append | Non-blocking | Synchronous | Synchronous data only |
| 0 | 1 | 2 | 3 |
§Example
use file_system::Status_type;
let status = Status_type::new(true, false, true, false);
assert_eq!(status.get_append(), true);
assert_eq!(status.get_non_blocking(), false);
assert_eq!(status.get_synchronous(), true);
assert_eq!(status.get_synchronous_data_only(), false);
Implementations§
Source§impl Status
impl Status
pub const APPEND_BIT: u8 = 1u8
pub const NON_BLOCKING_BIT: u8 = 2u8
pub const SYNCHRONOUS_BIT: u8 = 4u8
pub const SYNCHRONOUS_DATA_ONLY_BIT: u8 = 8u8
pub const SIZE: u8 = 4u8
pub const NON_BLOCKING: Self
pub const NONE: Self
pub const fn new( append: bool, non_blocking: bool, synchronous: bool, synchronous_data_only: bool, ) -> Self
pub const fn set_non_blocking(self, value: bool) -> Self
pub fn get_non_blocking(&self) -> bool
pub const fn set_append(self, value: bool) -> Self
pub const fn get_append(&self) -> bool
pub const fn set_synchronous(self, value: bool) -> Self
pub const fn get_synchronous(&self) -> bool
pub const fn set_synchronous_data_only(self, value: bool) -> Self
pub const fn get_synchronous_data_only(&self) -> bool
pub const fn from_u8(value: u8) -> Self
Trait Implementations§
impl Copy for Status
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
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