pub struct HeaderFlags { /* private fields */ }Expand description
SMB2 header flags.
Indicates how to process the operation.
Reference: MS-SMB2 2.2.1.2
Implementations§
Source§impl HeaderFlags
impl HeaderFlags
Source§impl HeaderFlags
impl HeaderFlags
Sourcepub const fn into_bytes(self) -> [u8; 4]
pub const fn into_bytes(self) -> [u8; 4]
Sourcepub const fn from_bytes(bytes: [u8; 4]) -> Self
pub const fn from_bytes(bytes: [u8; 4]) -> Self
Converts the given bytes directly into the bitfield struct.
Source§impl HeaderFlags
impl HeaderFlags
Sourcepub fn server_to_redir(&self) -> <bool as Specifier>::InOut
pub fn server_to_redir(&self) -> <bool as Specifier>::InOut
Returns the value of server_to_redir. Message is a server response (set in responses).
Sourcepub fn server_to_redir_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn server_to_redir_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of server_to_redir.
#Errors
If the returned value contains an invalid bit pattern for server_to_redir. Message is a server response (set in responses).
Sourcepub fn with_server_to_redir(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_server_to_redir(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of server_to_redir set to the given value.
#Panics
If the given value is out of bounds for server_to_redir. Message is a server response (set in responses).
Sourcepub fn with_server_to_redir_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_server_to_redir_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of server_to_redir set to the given value.
#Errors
If the given value is out of bounds for server_to_redir. Message is a server response (set in responses).
Sourcepub fn set_server_to_redir(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_server_to_redir(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of server_to_redir to the given value.
#Panics
If the given value is out of bounds for server_to_redir. Message is a server response (set in responses).
Sourcepub fn set_server_to_redir_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_server_to_redir_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of server_to_redir to the given value.
#Errors
If the given value is out of bounds for server_to_redir. Message is a server response (set in responses).
Sourcepub fn async_command(&self) -> <bool as Specifier>::InOut
pub fn async_command(&self) -> <bool as Specifier>::InOut
Returns the value of async_command. Message is part of an asynchronous operation.
Sourcepub fn async_command_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn async_command_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of async_command.
#Errors
If the returned value contains an invalid bit pattern for async_command. Message is part of an asynchronous operation.
Sourcepub fn with_async_command(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_async_command(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of async_command set to the given value.
#Panics
If the given value is out of bounds for async_command. Message is part of an asynchronous operation.
Sourcepub fn with_async_command_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_async_command_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of async_command set to the given value.
#Errors
If the given value is out of bounds for async_command. Message is part of an asynchronous operation.
Sourcepub fn set_async_command(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_async_command(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of async_command to the given value.
#Panics
If the given value is out of bounds for async_command. Message is part of an asynchronous operation.
Sourcepub fn set_async_command_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_async_command_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of async_command to the given value.
#Errors
If the given value is out of bounds for async_command. Message is part of an asynchronous operation.
Returns the value of related_operations. Request is a related operation in a compounded chain.
Returns the value of related_operations.
#Errors
If the returned value contains an invalid bit pattern for related_operations. Request is a related operation in a compounded chain.
Returns a copy of the bitfield with the value of related_operations set to the given value.
#Panics
If the given value is out of bounds for related_operations. Request is a related operation in a compounded chain.
Returns a copy of the bitfield with the value of related_operations set to the given value.
#Errors
If the given value is out of bounds for related_operations. Request is a related operation in a compounded chain.
Sets the value of related_operations to the given value.
#Panics
If the given value is out of bounds for related_operations. Request is a related operation in a compounded chain.
Sets the value of related_operations to the given value.
#Errors
If the given value is out of bounds for related_operations. Request is a related operation in a compounded chain.
Sourcepub fn signed(&self) -> <bool as Specifier>::InOut
pub fn signed(&self) -> <bool as Specifier>::InOut
Returns the value of signed. Message is signed.
Sourcepub fn signed_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn signed_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of signed.
#Errors
If the returned value contains an invalid bit pattern for signed. Message is signed.
Sourcepub fn with_signed(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_signed(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of signed set to the given value.
#Panics
If the given value is out of bounds for signed. Message is signed.
Sourcepub fn with_signed_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_signed_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of signed set to the given value.
#Errors
If the given value is out of bounds for signed. Message is signed.
Sourcepub fn set_signed(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_signed(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of signed to the given value.
#Panics
If the given value is out of bounds for signed. Message is signed.
Sourcepub fn set_signed_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_signed_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of signed to the given value.
#Errors
If the given value is out of bounds for signed. Message is signed.
Sourcepub fn priority_mask(&self) -> <B3 as Specifier>::InOut
pub fn priority_mask(&self) -> <B3 as Specifier>::InOut
Returns the value of priority_mask. Priority mask for quality of service.
Sourcepub fn priority_mask_or_err(
&self,
) -> Result<<B3 as Specifier>::InOut, InvalidBitPattern<<B3 as Specifier>::Bytes>>
pub fn priority_mask_or_err( &self, ) -> Result<<B3 as Specifier>::InOut, InvalidBitPattern<<B3 as Specifier>::Bytes>>
Returns the value of priority_mask.
#Errors
If the returned value contains an invalid bit pattern for priority_mask. Priority mask for quality of service.
Sourcepub fn with_priority_mask(self, new_val: <B3 as Specifier>::InOut) -> Self
pub fn with_priority_mask(self, new_val: <B3 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of priority_mask set to the given value.
#Panics
If the given value is out of bounds for priority_mask. Priority mask for quality of service.
Sourcepub fn with_priority_mask_checked(
self,
new_val: <B3 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_priority_mask_checked( self, new_val: <B3 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of priority_mask set to the given value.
#Errors
If the given value is out of bounds for priority_mask. Priority mask for quality of service.
Sourcepub fn set_priority_mask(&mut self, new_val: <B3 as Specifier>::InOut)
pub fn set_priority_mask(&mut self, new_val: <B3 as Specifier>::InOut)
Sets the value of priority_mask to the given value.
#Panics
If the given value is out of bounds for priority_mask. Priority mask for quality of service.
Sourcepub fn set_priority_mask_checked(
&mut self,
new_val: <B3 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_priority_mask_checked( &mut self, new_val: <B3 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of priority_mask to the given value.
#Errors
If the given value is out of bounds for priority_mask. Priority mask for quality of service.
Sourcepub fn dfs_operation(&self) -> <bool as Specifier>::InOut
pub fn dfs_operation(&self) -> <bool as Specifier>::InOut
Returns the value of dfs_operation. Request is a DFS operation.
Sourcepub fn dfs_operation_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn dfs_operation_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of dfs_operation.
#Errors
If the returned value contains an invalid bit pattern for dfs_operation. Request is a DFS operation.
Sourcepub fn with_dfs_operation(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_dfs_operation(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of dfs_operation set to the given value.
#Panics
If the given value is out of bounds for dfs_operation. Request is a DFS operation.
Sourcepub fn with_dfs_operation_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_dfs_operation_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of dfs_operation set to the given value.
#Errors
If the given value is out of bounds for dfs_operation. Request is a DFS operation.
Sourcepub fn set_dfs_operation(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_dfs_operation(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of dfs_operation to the given value.
#Panics
If the given value is out of bounds for dfs_operation. Request is a DFS operation.
Sourcepub fn set_dfs_operation_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_dfs_operation_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of dfs_operation to the given value.
#Errors
If the given value is out of bounds for dfs_operation. Request is a DFS operation.
Sourcepub fn replay_operation(&self) -> <bool as Specifier>::InOut
pub fn replay_operation(&self) -> <bool as Specifier>::InOut
Returns the value of replay_operation. Request is a replay operation for resilient handles.
Sourcepub fn replay_operation_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn replay_operation_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of replay_operation.
#Errors
If the returned value contains an invalid bit pattern for replay_operation. Request is a replay operation for resilient handles.
Sourcepub fn with_replay_operation(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_replay_operation(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of replay_operation set to the given value.
#Panics
If the given value is out of bounds for replay_operation. Request is a replay operation for resilient handles.
Sourcepub fn with_replay_operation_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_replay_operation_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of replay_operation set to the given value.
#Errors
If the given value is out of bounds for replay_operation. Request is a replay operation for resilient handles.
Sourcepub fn set_replay_operation(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_replay_operation(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of replay_operation to the given value.
#Panics
If the given value is out of bounds for replay_operation. Request is a replay operation for resilient handles.
Sourcepub fn set_replay_operation_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_replay_operation_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of replay_operation to the given value.
#Errors
If the given value is out of bounds for replay_operation. Request is a replay operation for resilient handles.
Trait Implementations§
Source§impl BinRead for HeaderFlags
impl BinRead for HeaderFlags
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>
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>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for HeaderFlags
impl BinWrite for HeaderFlags
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<()>
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<()>
Source§fn write<W>(&self, writer: &mut W) -> Result<(), Error>
fn write<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer using default arguments. Read moreSource§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming little-endian byte order. Read moreSource§fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming native-endian byte order. Read moreSource§fn write_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Self to the writer using the given arguments. Read moreSource§fn write_be_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Self to the writer, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for HeaderFlags
impl Clone for HeaderFlags
Source§fn clone(&self) -> HeaderFlags
fn clone(&self) -> HeaderFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more