Skip to main content

Status

Struct Status 

Source
pub struct Status(pub u32);
Expand description

NT status code carried in the SMB header status field.

Values follow the NTSTATUS numbering used throughout [MS-SMB]/[MS-CIFS]; when the client did not negotiate CAP_STATUS32 the dispatcher converts these to DOS class/code pairs.

Tuple Fields§

§0: u32

Implementations§

Source§

impl Status

Source

pub const SUCCESS: Status

The operation completed successfully.

Source

pub const UNSUCCESSFUL: Status

Generic failure.

Source

pub const NOT_IMPLEMENTED: Status

Function not implemented by this server.

A create traversed a symbolic link ([MS-SMB2] §2.2.2.2.1).

Source

pub const END_OF_FILE: Status

End of file reached during a read.

Source

pub const INVALID_HANDLE: Status

The supplied handle (FID) is not valid on this session/tree.

Source

pub const INVALID_PARAMETER: Status

A parameter passed to the operation was invalid.

Source

pub const NO_SUCH_FILE: Status

Requested file does not exist.

Source

pub const LOGON_FAILURE: Status

Supplied credentials are invalid.

Source

pub const MORE_PROCESSING_REQUIRED: Status

More processing is required (multi-leg authentication).

Source

pub const OBJECT_NAME_NOT_FOUND: Status

The object name was not found.

Source

pub const OBJECT_NAME_COLLISION: Status

An object with the given name already exists.

Source

pub const OBJECT_PATH_NOT_FOUND: Status

A component of the path was not found.

Source

pub const USER_SESSION_DELETED: Status

The user session referenced has been deleted/invalidated.

Source

pub const FILE_NOT_AVAILABLE: Status

The file is temporarily unavailable (e.g. a live persistent handle).

Source

pub const REQUEST_NOT_ACCEPTED: Status

The request is not accepted in the current lease-break state.

Source

pub const ACCESS_DENIED: Status

Access to the object was denied.

Source

pub const BUFFER_TOO_SMALL: Status

The output buffer was too small to hold the requested data.

Source

pub const NOT_FOUND: Status

The requested item was not found (e.g. a non-DFS path for a referral).

Source

pub const SHARING_VIOLATION: Status

Another handle holds a conflicting open on the object.

Source

pub const DELETE_PENDING: Status

Deletion has already been requested for this object.

Source

pub const DIRECTORY_NOT_EMPTY: Status

Cannot remove a directory that still contains entries.

Source

pub const NOT_A_DIRECTORY: Status

An operation expected a file but found a directory (or vice versa).

Source

pub const FILE_IS_A_DIRECTORY: Status

An operation expected a directory but found a file.

Source

pub const BAD_NETWORK_NAME: Status

The share name is unknown to the server.

Source

pub const NETWORK_NAME_DELETED: Status

The tree connect referenced by TreeId no longer exists on the server.

Source

pub const FILE_FORCED_CLOSED: Status

A prior open was force-closed by an application-instance failover.

Source

pub const FILE_CLOSED: Status

The handle was closed out from under this open (app-instance failover).

Source

pub const CANCELLED: Status

The request was cancelled by the client.

Source

pub const NOTIFY_CLEANUP: Status

A pending CHANGE_NOTIFY was completed because its handle was closed ([MS-SMB2] §3.3.5.10). Severity is success, so clients treat the CHANGE_NOTIFY response as a (non-error) notification.

Source

pub const LOCK_NOT_GRANTED: Status

A byte-range lock request conflicts with an existing lock ([MS-SMB2] §2.2.26, STATUS_LOCK_NOT_GRANTED).

Source

pub const FILE_LOCK_CONFLICT: Status

A read/write overlapped a conflicting byte-range lock ([MS-SMB2] §2.2.26).

Source

pub const SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP: Status

SMB 3.1.1 negotiate carried no hash algorithm the server supports ([MS-SMB2] §3.3.5.4).

Source

pub const PENDING: Status

The operation is being processed asynchronously; an interim response ([MS-SMB2] §3.3.4.2) precedes the final one.

Source

pub const NO_MORE_FILES: Status

No more matching directory entries (warning severity).

Source

pub const INVALID_DEVICE_REQUEST: Status

The request specified an unknown device or request type.

Source

pub fn raw(self) -> u32

Raw NTSTATUS value.

Source

pub fn is_error(self) -> bool

True when the severity bits indicate an error (severity 3).

Source

pub fn to_dos(self) -> (u8, u8)

Map to a DOS error (class, code) for clients without CAP_STATUS32 ([MS-CIFS] §2.2.2.4 error classes and codes).

Trait Implementations§

Source§

impl Clone for Status

Source§

fn clone(&self) -> Status

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Status

Source§

impl Debug for Status

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Status

Source§

impl Hash for Status

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Status

Source§

fn eq(&self, other: &Status) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Status

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.