Status

Enum Status 

Source
#[repr(u32)]
pub enum Status {
Show 45 variants Success = 0, Pending = 259, NotifyCleanup = 267, NotifyEnumDir = 268, InvalidSmb = 65_538, SmbBadTid = 327_682, SmbBadCommand = 1_441_794, SmbBadUid = 5_963_778, SmbUseStandard = 16_449_538, BufferOverflow = 2_147_483_653, NoMoreFiles = 2_147_483_654, StoppedOnSymlink = 2_147_483_693, NotImplemented = 3_221_225_474, InvalidInfoClass = 3_221_225_475, InfoLengthMismatch = 3_221_225_476, InvalidParameter = 3_221_225_485, NoSuchDevice = 3_221_225_486, InvalidDeviceRequest0 = 3_221_225_488, EndOfFile = 3_221_225_489, MoreProcessingRequired = 3_221_225_494, AccessDenied = 3_221_225_506, BufferTooSmall = 3_221_225_507, ObjectNameInvalid = 3_221_225_523, ObjectNameNotFound = 3_221_225_524, ObjectNameCollision = 3_221_225_525, SharingViolation = 3_221_225_539, ObjectPathNotFound = 3_221_225_530, NoEasOnFile = 3_221_225_540, LogonFailure = 3_221_225_581, NotMapped = 3_221_225_587, BadImpersonationLevel = 3_221_225_637, IoTimeout = 3_221_225_653, FileIsADirectory = 3_221_225_658, NotSupported = 3_221_225_659, NetworkNameDeleted = 3_221_225_673, BadNetworkName = 3_221_225_676, RequestNotAccepted = 3_221_225_680, DirectoryNotEmpty = 3_221_225_729, Cancelled = 3_221_225_760, UserSessionDeleted = 3_221_225_987, UserAccountLockedOut = 3_221_226_036, PathNotCovered = 3_221_226_071, NetworkSessionExpired = 3_221_226_332, SmbTooManyUids = 3_221_233_754, DeviceFeatureNotSupported = 3_221_226_595,
}
Expand description

NT Status codes for SMB.

For each status code, a U32 constant is also provided for easier access. for example, Status::U32_END_OF_FILE is 0xC0000011, matching Status::EndOfFile.

Variants§

§

Success = 0

Success (0x00000000)

§

Pending = 259

Pending (0x00000103)

§

NotifyCleanup = 267

Notify Cleanup (0x0000010B)

§

NotifyEnumDir = 268

Notify Enum Dir (0x0000010C)

§

InvalidSmb = 65_538

Invalid SMB (0x00010002)

§

SmbBadTid = 327_682

SMB Bad TID (0x00050002)

§

SmbBadCommand = 1_441_794

SMB Bad Command (0x00160002)

§

SmbBadUid = 5_963_778

SMB Bad UID (0x005B0002)

§

SmbUseStandard = 16_449_538

SMB Use Standard (0x00FB0002)

§

BufferOverflow = 2_147_483_653

Buffer Overflow (0x80000005)

§

NoMoreFiles = 2_147_483_654

No More Files (0x80000006)

Stopped on Symlink (0x8000002D)

§

NotImplemented = 3_221_225_474

Not Implemented (0xC0000002)

§

InvalidInfoClass = 3_221_225_475

Invalid Info Class (0xC0000003)

§

InfoLengthMismatch = 3_221_225_476

Info Length Mismatch (0xC0000004)

§

InvalidParameter = 3_221_225_485

Invalid Parameter (0xC000000D)

§

NoSuchDevice = 3_221_225_486

No Such Device (0xC000000E)

§

InvalidDeviceRequest0 = 3_221_225_488

Invalid Device Request (0xC0000010)

§

EndOfFile = 3_221_225_489

End of File (0xC0000011)

§

MoreProcessingRequired = 3_221_225_494

More Processing Required (0xC0000016)

§

AccessDenied = 3_221_225_506

Access Denied (0xC0000022)

§

BufferTooSmall = 3_221_225_507

Buffer Too Small (0xC0000023)

§

ObjectNameInvalid = 3_221_225_523

Object Name Invalid (0xC0000033)

§

ObjectNameNotFound = 3_221_225_524

Object Name Not Found (0xC0000034)

§

ObjectNameCollision = 3_221_225_525

Object Name Collision (0xC0000035)

§

SharingViolation = 3_221_225_539

Sharing Violation (0xC0000043)

§

ObjectPathNotFound = 3_221_225_530

Object Path Not Found (0xC000003A)

§

NoEasOnFile = 3_221_225_540

No EAs on File (0xC0000044)

§

LogonFailure = 3_221_225_581

Logon Failure (0xC000006D)

§

NotMapped = 3_221_225_587

Not Mapped (0xC0000073)

§

BadImpersonationLevel = 3_221_225_637

Bad Impersonation Level (0xC00000A5)

§

IoTimeout = 3_221_225_653

I/O Timeout (0xC00000B5)

§

FileIsADirectory = 3_221_225_658

File is a Directory (0xC00000BA)

§

NotSupported = 3_221_225_659

Not Supported (0xC00000BB)

§

NetworkNameDeleted = 3_221_225_673

Network Name Deleted (0xC00000C9)

§

BadNetworkName = 3_221_225_676

Bad Network Name (0xC00000CC)

§

RequestNotAccepted = 3_221_225_680

Request Not Accepted (0xC00000D0)

§

DirectoryNotEmpty = 3_221_225_729

Directory Not Empty (0xC0000101)

§

Cancelled = 3_221_225_760

Cancelled (0xC0000120)

§

UserSessionDeleted = 3_221_225_987

User Session Deleted (0xC0000203)

§

UserAccountLockedOut = 3_221_226_036

User Account Locked Out (0xC0000234)

§

PathNotCovered = 3_221_226_071

Path Not Covered (0xC0000257)

§

NetworkSessionExpired = 3_221_226_332

Network Session Expired (0xC000035C)

§

SmbTooManyUids = 3_221_233_754

SMB Too Many UIDs (0xC000205A)

§

DeviceFeatureNotSupported = 3_221_226_595

Device Feature Not Supported (0xC0000463)

Implementations§

Source§

impl Status

Source

pub const U32_SUCCESS: u32 = 0u32

Success as u32

Source

pub const U32_PENDING: u32 = 259u32

Pending as u32

Source

pub const U32_NOTIFY_CLEANUP: u32 = 267u32

Source

pub const U32_NOTIFY_ENUM_DIR: u32 = 268u32

Source

pub const U32_INVALID_SMB: u32 = 65_538u32

InvalidSmb as u32

Source

pub const U32_SMB_BAD_TID: u32 = 327_682u32

SmbBadTid as u32

Source

pub const U32_SMB_BAD_COMMAND: u32 = 1_441_794u32

Source

pub const U32_SMB_BAD_UID: u32 = 5_963_778u32

SmbBadUid as u32

Source

pub const U32_SMB_USE_STANDARD: u32 = 16_449_538u32

Source

pub const U32_BUFFER_OVERFLOW: u32 = 2_147_483_653u32

Source

pub const U32_NO_MORE_FILES: u32 = 2_147_483_654u32

NoMoreFiles as u32

Source

pub const U32_NOT_IMPLEMENTED: u32 = 3_221_225_474u32

Source

pub const U32_INVALID_INFO_CLASS: u32 = 3_221_225_475u32

Source

pub const U32_INFO_LENGTH_MISMATCH: u32 = 3_221_225_476u32

Source

pub const U32_INVALID_PARAMETER: u32 = 3_221_225_485u32

Source

pub const U32_NO_SUCH_DEVICE: u32 = 3_221_225_486u32

NoSuchDevice as u32

Source

pub const U32_INVALID_DEVICE_REQUEST0: u32 = 3_221_225_488u32

Source

pub const U32_END_OF_FILE: u32 = 3_221_225_489u32

EndOfFile as u32

Source

pub const U32_MORE_PROCESSING_REQUIRED: u32 = 3_221_225_494u32

Source

pub const U32_ACCESS_DENIED: u32 = 3_221_225_506u32

AccessDenied as u32

Source

pub const U32_BUFFER_TOO_SMALL: u32 = 3_221_225_507u32

Source

pub const U32_OBJECT_NAME_INVALID: u32 = 3_221_225_523u32

Source

pub const U32_OBJECT_NAME_NOT_FOUND: u32 = 3_221_225_524u32

Source

pub const U32_OBJECT_NAME_COLLISION: u32 = 3_221_225_525u32

Source

pub const U32_SHARING_VIOLATION: u32 = 3_221_225_539u32

Source

pub const U32_OBJECT_PATH_NOT_FOUND: u32 = 3_221_225_530u32

Source

pub const U32_NO_EAS_ON_FILE: u32 = 3_221_225_540u32

NoEasOnFile as u32

Source

pub const U32_LOGON_FAILURE: u32 = 3_221_225_581u32

LogonFailure as u32

Source

pub const U32_NOT_MAPPED: u32 = 3_221_225_587u32

NotMapped as u32

Source

pub const U32_BAD_IMPERSONATION_LEVEL: u32 = 3_221_225_637u32

Source

pub const U32_IO_TIMEOUT: u32 = 3_221_225_653u32

IoTimeout as u32

Source

pub const U32_FILE_IS_A_DIRECTORY: u32 = 3_221_225_658u32

Source

pub const U32_NOT_SUPPORTED: u32 = 3_221_225_659u32

NotSupported as u32

Source

pub const U32_NETWORK_NAME_DELETED: u32 = 3_221_225_673u32

Source

pub const U32_BAD_NETWORK_NAME: u32 = 3_221_225_676u32

Source

pub const U32_REQUEST_NOT_ACCEPTED: u32 = 3_221_225_680u32

Source

pub const U32_DIRECTORY_NOT_EMPTY: u32 = 3_221_225_729u32

Source

pub const U32_CANCELLED: u32 = 3_221_225_760u32

Cancelled as u32

Source

pub const U32_USER_SESSION_DELETED: u32 = 3_221_225_987u32

Source

pub const U32_USER_ACCOUNT_LOCKED_OUT: u32 = 3_221_226_036u32

Source

pub const U32_PATH_NOT_COVERED: u32 = 3_221_226_071u32

Source

pub const U32_NETWORK_SESSION_EXPIRED: u32 = 3_221_226_332u32

Source

pub const U32_SMB_TOO_MANY_UIDS: u32 = 3_221_233_754u32

Source

pub const U32_DEVICE_FEATURE_NOT_SUPPORTED: u32 = 3_221_226_595u32

Source

pub fn try_display_as_status(value: u32) -> String

A helper function that tries converting u32 to a Status, and returns a string representation of the status. Otherwise, it returns the hex representation of the u32 value. This is useful for displaying NT status codes that are not necessarily defined in the Status enum.

Trait Implementations§

Source§

impl BinRead for Status

Source§

type Args<'__binrw_generated_args_lifetime> = ()

The type used for the args parameter of read_args() and read_options(). Read more
Source§

fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>

Read Self from the reader using the given Endian and arguments. Read more
Source§

fn read_be<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming big-endian byte order. Read more
Source§

fn read_le<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming little-endian byte order. Read more
Source§

fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read T from the reader assuming native-endian byte order. Read more
Source§

fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming big-endian byte order, using the given arguments. Read more
Source§

fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming little-endian byte order, using the given arguments. Read more
Source§

fn read_ne_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read T from the reader, assuming native-endian byte order, using the given arguments. Read more
Source§

impl BinWrite for Status

Source§

type Args<'__binrw_generated_args_lifetime> = ()

The type used for the args parameter of write_args() and write_options(). Read more
Source§

fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>

Write Self to the writer using the given Endian and arguments. Read more
Source§

fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming big-endian byte order. Read more
Source§

fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming little-endian byte order. Read more
Source§

fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming native-endian byte order. Read more
Source§

fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming big-endian byte order, using the given arguments. Read more
Source§

fn write_le_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming little-endian byte order, using the given arguments. Read more
Source§

fn write_ne_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming native-endian byte order, using the given arguments. Read more
Source§

impl Clone for Status

Source§

fn clone(&self) -> Status

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Status

Source§

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

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

impl Display for Status

Source§

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

Formats the value using the given formatter. 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 · 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 TryFrom<u32> for Status

Source§

type Error = SmbMsgError

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

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for Status

Source§

impl Eq for Status

Source§

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> 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> CustomError for T
where T: Display + Debug + Send + Sync + 'static,

Source§

fn as_any(&self) -> &(dyn Any + Send + Sync + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + Send + Sync + 'static)

Source§

fn as_box_any(self: Box<T>) -> Box<dyn Any + Send + Sync>

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V