pub struct GlobalCapabilities { /* private fields */ }Expand description
Global capabilities flags for SMB2/SMB3.
Indicates various protocol capabilities supported by the client or server.
Reference: MS-SMB2 2.2.3
Implementations§
Source§impl GlobalCapabilities
impl GlobalCapabilities
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 GlobalCapabilities
impl GlobalCapabilities
Sourcepub fn dfs_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn dfs_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of dfs.
#Errors
If the returned value contains an invalid bit pattern for dfs. DFS support.
Sourcepub fn with_dfs(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_dfs(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of dfs set to the given value.
#Panics
If the given value is out of bounds for dfs. DFS support.
Sourcepub fn with_dfs_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_dfs_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of dfs set to the given value.
#Errors
If the given value is out of bounds for dfs. DFS support.
Sourcepub fn set_dfs(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_dfs(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of dfs to the given value.
#Panics
If the given value is out of bounds for dfs. DFS support.
Sourcepub fn set_dfs_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_dfs_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of dfs to the given value.
#Errors
If the given value is out of bounds for dfs. DFS support.
Sourcepub fn leasing(&self) -> <bool as Specifier>::InOut
pub fn leasing(&self) -> <bool as Specifier>::InOut
Returns the value of leasing. File leasing support.
Sourcepub fn leasing_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn leasing_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of leasing.
#Errors
If the returned value contains an invalid bit pattern for leasing. File leasing support.
Sourcepub fn with_leasing(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_leasing(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of leasing set to the given value.
#Panics
If the given value is out of bounds for leasing. File leasing support.
Sourcepub fn with_leasing_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_leasing_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of leasing set to the given value.
#Errors
If the given value is out of bounds for leasing. File leasing support.
Sourcepub fn set_leasing(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_leasing(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of leasing to the given value.
#Panics
If the given value is out of bounds for leasing. File leasing support.
Sourcepub fn set_leasing_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_leasing_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of leasing to the given value.
#Errors
If the given value is out of bounds for leasing. File leasing support.
Sourcepub fn large_mtu(&self) -> <bool as Specifier>::InOut
pub fn large_mtu(&self) -> <bool as Specifier>::InOut
Returns the value of large_mtu. Large MTU support (multiple credit operations).
Sourcepub fn large_mtu_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn large_mtu_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of large_mtu.
#Errors
If the returned value contains an invalid bit pattern for large_mtu. Large MTU support (multiple credit operations).
Sourcepub fn with_large_mtu(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_large_mtu(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of large_mtu set to the given value.
#Panics
If the given value is out of bounds for large_mtu. Large MTU support (multiple credit operations).
Sourcepub fn with_large_mtu_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_large_mtu_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of large_mtu set to the given value.
#Errors
If the given value is out of bounds for large_mtu. Large MTU support (multiple credit operations).
Sourcepub fn set_large_mtu(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_large_mtu(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of large_mtu to the given value.
#Panics
If the given value is out of bounds for large_mtu. Large MTU support (multiple credit operations).
Sourcepub fn set_large_mtu_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_large_mtu_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of large_mtu to the given value.
#Errors
If the given value is out of bounds for large_mtu. Large MTU support (multiple credit operations).
Sourcepub fn multi_channel(&self) -> <bool as Specifier>::InOut
pub fn multi_channel(&self) -> <bool as Specifier>::InOut
Returns the value of multi_channel. Multi-channel support.
Sourcepub fn multi_channel_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn multi_channel_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of multi_channel.
#Errors
If the returned value contains an invalid bit pattern for multi_channel. Multi-channel support.
Sourcepub fn with_multi_channel(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_multi_channel(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of multi_channel set to the given value.
#Panics
If the given value is out of bounds for multi_channel. Multi-channel support.
Sourcepub fn with_multi_channel_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_multi_channel_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of multi_channel set to the given value.
#Errors
If the given value is out of bounds for multi_channel. Multi-channel support.
Sourcepub fn set_multi_channel(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_multi_channel(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of multi_channel to the given value.
#Panics
If the given value is out of bounds for multi_channel. Multi-channel support.
Sourcepub fn set_multi_channel_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_multi_channel_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of multi_channel to the given value.
#Errors
If the given value is out of bounds for multi_channel. Multi-channel support.
Sourcepub fn persistent_handles(&self) -> <bool as Specifier>::InOut
pub fn persistent_handles(&self) -> <bool as Specifier>::InOut
Returns the value of persistent_handles. Persistent handles support.
Sourcepub fn persistent_handles_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn persistent_handles_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of persistent_handles.
#Errors
If the returned value contains an invalid bit pattern for persistent_handles. Persistent handles support.
Sourcepub fn with_persistent_handles(
self,
new_val: <bool as Specifier>::InOut,
) -> Self
pub fn with_persistent_handles( self, new_val: <bool as Specifier>::InOut, ) -> Self
Returns a copy of the bitfield with the value of persistent_handles set to the given value.
#Panics
If the given value is out of bounds for persistent_handles. Persistent handles support.
Sourcepub fn with_persistent_handles_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_persistent_handles_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of persistent_handles set to the given value.
#Errors
If the given value is out of bounds for persistent_handles. Persistent handles support.
Sourcepub fn set_persistent_handles(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_persistent_handles(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of persistent_handles to the given value.
#Panics
If the given value is out of bounds for persistent_handles. Persistent handles support.
Sourcepub fn set_persistent_handles_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_persistent_handles_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of persistent_handles to the given value.
#Errors
If the given value is out of bounds for persistent_handles. Persistent handles support.
Sourcepub fn directory_leasing(&self) -> <bool as Specifier>::InOut
pub fn directory_leasing(&self) -> <bool as Specifier>::InOut
Returns the value of directory_leasing. Directory leasing support.
Sourcepub fn directory_leasing_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn directory_leasing_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of directory_leasing.
#Errors
If the returned value contains an invalid bit pattern for directory_leasing. Directory leasing support.
Sourcepub fn with_directory_leasing(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_directory_leasing(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of directory_leasing set to the given value.
#Panics
If the given value is out of bounds for directory_leasing. Directory leasing support.
Sourcepub fn with_directory_leasing_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_directory_leasing_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of directory_leasing set to the given value.
#Errors
If the given value is out of bounds for directory_leasing. Directory leasing support.
Sourcepub fn set_directory_leasing(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_directory_leasing(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of directory_leasing to the given value.
#Panics
If the given value is out of bounds for directory_leasing. Directory leasing support.
Sourcepub fn set_directory_leasing_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_directory_leasing_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of directory_leasing to the given value.
#Errors
If the given value is out of bounds for directory_leasing. Directory leasing support.
Sourcepub fn encryption(&self) -> <bool as Specifier>::InOut
pub fn encryption(&self) -> <bool as Specifier>::InOut
Returns the value of encryption. Encryption support.
Sourcepub fn encryption_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn encryption_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of encryption.
#Errors
If the returned value contains an invalid bit pattern for encryption. Encryption support.
Sourcepub fn with_encryption(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_encryption(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of encryption set to the given value.
#Panics
If the given value is out of bounds for encryption. Encryption support.
Sourcepub fn with_encryption_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_encryption_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of encryption set to the given value.
#Errors
If the given value is out of bounds for encryption. Encryption support.
Sourcepub fn set_encryption(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_encryption(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of encryption to the given value.
#Panics
If the given value is out of bounds for encryption. Encryption support.
Sourcepub fn set_encryption_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_encryption_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of encryption to the given value.
#Errors
If the given value is out of bounds for encryption. Encryption support.
Sourcepub fn notifications(&self) -> <bool as Specifier>::InOut
pub fn notifications(&self) -> <bool as Specifier>::InOut
Returns the value of notifications. Change notifications support.
Sourcepub fn notifications_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn notifications_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of notifications.
#Errors
If the returned value contains an invalid bit pattern for notifications. Change notifications support.
Sourcepub fn with_notifications(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_notifications(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of notifications set to the given value.
#Panics
If the given value is out of bounds for notifications. Change notifications support.
Sourcepub fn with_notifications_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_notifications_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of notifications set to the given value.
#Errors
If the given value is out of bounds for notifications. Change notifications support.
Sourcepub fn set_notifications(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_notifications(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of notifications to the given value.
#Panics
If the given value is out of bounds for notifications. Change notifications support.
Sourcepub fn set_notifications_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_notifications_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of notifications to the given value.
#Errors
If the given value is out of bounds for notifications. Change notifications support.
Trait Implementations§
Source§impl BinRead for GlobalCapabilities
impl BinRead for GlobalCapabilities
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 GlobalCapabilities
impl BinWrite for GlobalCapabilities
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 GlobalCapabilities
impl Clone for GlobalCapabilities
Source§fn clone(&self) -> GlobalCapabilities
fn clone(&self) -> GlobalCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more