[−][src]Struct nt_native::Handle
Methods
impl Handle
[src]
pub const fn invalid() -> Handle
[src]
pub const fn new(handle: HANDLE) -> Handle
[src]
Takes ownership of the raw OS handle
pub fn is_valid(&self) -> bool
[src]
pub fn close(&mut self) -> Result<()>
[src]
pub fn object_name(&self) -> Result<NtString>
[src]
Returns full object name.
For files it would be something like \Device\HarddiskVolume3\RootDir\Dir\file.ext
Warning: this call uses well-known, but Undocumented structure!
pub fn remove_object(self) -> Result<()>
[src]
ShareAccess::DELETE flag should be set.
Warning: the file will be deleted immediately after the call! The system will not wait until the last HANDLE to the file is closed.
impl Handle
[src]
pub fn ioctl<I: AsByteSlice, O: AsByteSliceMut>(
&self,
code: u32,
input: &I,
output: &mut O
) -> Result<()>
[src]
&self,
code: u32,
input: &I,
output: &mut O
) -> Result<()>
pub fn ioctl_status(&self, code: u32) -> NTSTATUS
[src]
pub fn ioctl_query<T: AsByteSliceMut>(
&self,
code: u32,
output: &mut T
) -> Result<()>
[src]
&self,
code: u32,
output: &mut T
) -> Result<()>
pub fn ioctl_same_buffer<T: Sized>(
&self,
code: u32,
buffer: &mut T
) -> Result<()>
[src]
&self,
code: u32,
buffer: &mut T
) -> Result<()>
pub fn ioctl_raw(
&self,
code: u32,
in_buffer: &[u8],
out_buffer: &mut [u8]
) -> (NTSTATUS, usize)
[src]
&self,
code: u32,
in_buffer: &[u8],
out_buffer: &mut [u8]
) -> (NTSTATUS, usize)
impl Handle
[src]
pub fn write(&self, data: &[u8], pos: Option<u64>) -> Result<usize>
[src]
pub fn read(&self, buffer: &mut [u8], pos: Option<u64>) -> Result<usize>
[src]
pub fn flush(&self) -> Result<()>
[src]
Trait Implementations
impl AsRawHandle for Handle
[src]
fn as_raw_handle(&self) -> RawHandle
[src]
impl Clone for Handle
[src]
impl Debug for Handle
[src]
impl Drop for Handle
[src]
impl From<Handle> for File
[src]
impl From<Handle> for Volume
[src]
impl From<Handle> for Disk
[src]
impl FromRawHandle for Handle
[src]
unsafe fn from_raw_handle(handle: RawHandle) -> Self
[src]
impl IntoRawHandle for Handle
[src]
fn into_raw_handle(self) -> RawHandle
[src]
impl Read for Handle
[src]
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
fn read_vectored(&mut self, bufs: &mut [IoSliceMut]) -> Result<usize, Error>
1.36.0[src]
unsafe fn initializer(&self) -> Initializer
[src]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
1.0.0[src]
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src]
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
1.6.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
fn bytes(self) -> Bytes<Self>
1.0.0[src]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src]
R: Read,
fn take(self, limit: u64) -> Take<Self>
1.0.0[src]
impl Send for Handle
[src]
impl Sync for Handle
[src]
impl Write for Handle
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice]) -> Result<usize, Error>
1.36.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice]) -> Result<(), Error>
[src]
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,