pub struct NegotiateContext {
pub context_type: NegotiateContextType,
pub data: NegotiateContextValue,
}Expand description
A single negotiate context item.
Used in SMB 3.1.1 to negotiate additional capabilities beyond the base protocol.
Note: This struct should usually be NOT used directly.
To construct it, use impl From<ContextValueStruct> for NegotiateContext:
let signing_ctx: NegotiateContext = SigningCapabilities {
signing_algorithms: vec![SigningAlgorithmId::AesGmac]
}.into();Reference: MS-SMB2 2.2.3.1
Fields§
§context_type: NegotiateContextTypeType of the negotiate context.
data: NegotiateContextValueContext-specific data.
Trait Implementations§
Source§impl BinRead for NegotiateContext
impl BinRead for NegotiateContext
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_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
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>
Read
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>
Read
T from the reader assuming native-endian byte order. 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>
Read
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for NegotiateContext
impl BinWrite for NegotiateContext
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_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
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>
Write
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>
Write
Self to the writer assuming native-endian byte order. 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>
Write
Self to the writer, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Debug for NegotiateContext
impl Debug for NegotiateContext
Source§impl From<CompressionCapabilities> for NegotiateContext
impl From<CompressionCapabilities> for NegotiateContext
Source§fn from(val: CompressionCapabilities) -> Self
fn from(val: CompressionCapabilities) -> Self
Converts to this type from the input type.
Source§impl From<EncryptionCapabilities> for NegotiateContext
impl From<EncryptionCapabilities> for NegotiateContext
Source§fn from(val: EncryptionCapabilities) -> Self
fn from(val: EncryptionCapabilities) -> Self
Converts to this type from the input type.
Source§impl From<NetnameNegotiateContextId> for NegotiateContext
impl From<NetnameNegotiateContextId> for NegotiateContext
Source§fn from(val: NetnameNegotiateContextId) -> Self
fn from(val: NetnameNegotiateContextId) -> Self
Converts to this type from the input type.
Source§impl From<PreauthIntegrityCapabilities> for NegotiateContext
impl From<PreauthIntegrityCapabilities> for NegotiateContext
Source§fn from(val: PreauthIntegrityCapabilities) -> Self
fn from(val: PreauthIntegrityCapabilities) -> Self
Converts to this type from the input type.
Source§impl From<RdmaTransformCapabilities> for NegotiateContext
impl From<RdmaTransformCapabilities> for NegotiateContext
Source§fn from(val: RdmaTransformCapabilities) -> Self
fn from(val: RdmaTransformCapabilities) -> Self
Converts to this type from the input type.
Source§impl From<SigningCapabilities> for NegotiateContext
impl From<SigningCapabilities> for NegotiateContext
Source§fn from(val: SigningCapabilities) -> Self
fn from(val: SigningCapabilities) -> Self
Converts to this type from the input type.
Source§impl From<TransportCapabilities> for NegotiateContext
impl From<TransportCapabilities> for NegotiateContext
Source§fn from(val: TransportCapabilities) -> Self
fn from(val: TransportCapabilities) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NegotiateContext
impl PartialEq for NegotiateContext
impl Eq for NegotiateContext
impl StructuralPartialEq for NegotiateContext
Auto Trait Implementations§
impl Freeze for NegotiateContext
impl RefUnwindSafe for NegotiateContext
impl Send for NegotiateContext
impl Sync for NegotiateContext
impl Unpin for NegotiateContext
impl UnwindSafe for NegotiateContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more