pub enum RequestContent {
Show 20 variants
Negotiate(NegotiateRequest),
SessionSetup(SessionSetupRequest),
Logoff(LogoffRequest),
TreeConnect(TreeConnectRequest),
TreeDisconnect(TreeDisconnectRequest),
Create(CreateRequest),
Close(CloseRequest),
Flush(FlushRequest),
Read(ReadRequest),
Write(WriteRequest),
Lock(LockRequest),
Ioctl(IoctlRequest),
Echo(EchoRequest),
QueryDirectory(QueryDirectoryRequest),
ChangeNotify(ChangeNotifyRequest),
QueryInfo(QueryInfoRequest),
SetInfo(SetInfoRequest),
Cancel(CancelRequest),
OplockBreakAck(OplockBreakAck),
LeaseBreakAck(LeaseBreakAck),
}Variants§
Negotiate(NegotiateRequest)
SessionSetup(SessionSetupRequest)
Logoff(LogoffRequest)
TreeConnect(TreeConnectRequest)
TreeDisconnect(TreeDisconnectRequest)
Create(CreateRequest)
Close(CloseRequest)
Flush(FlushRequest)
Read(ReadRequest)
Write(WriteRequest)
Lock(LockRequest)
Ioctl(IoctlRequest)
Echo(EchoRequest)
QueryDirectory(QueryDirectoryRequest)
ChangeNotify(ChangeNotifyRequest)
QueryInfo(QueryInfoRequest)
SetInfo(SetInfoRequest)
Cancel(CancelRequest)
OplockBreakAck(OplockBreakAck)
LeaseBreakAck(LeaseBreakAck)
Implementations§
Source§impl RequestContent
impl RequestContent
Sourcepub fn associated_cmd(&self) -> Command
pub fn associated_cmd(&self) -> Command
Get the command associated with this content.
Source§impl RequestContent
impl RequestContent
Sourcepub fn content_name(&self) -> &'static str
pub fn content_name(&self) -> &'static str
Returns the name of the content value.
Sourcepub fn to_negotiate(self) -> Result<NegotiateRequest, SmbMsgError>
pub fn to_negotiate(self) -> Result<NegotiateRequest, SmbMsgError>
Attempts to cast the current content type to [negotiate :: NegotiateRequest].
Sourcepub fn as_negotiate(&self) -> Result<&NegotiateRequest, SmbMsgError>
pub fn as_negotiate(&self) -> Result<&NegotiateRequest, SmbMsgError>
Attempts to cast the current content type to [negotiate :: NegotiateRequest].
Sourcepub fn as_mut_negotiate(&mut self) -> Result<&mut NegotiateRequest, SmbMsgError>
pub fn as_mut_negotiate(&mut self) -> Result<&mut NegotiateRequest, SmbMsgError>
Attempts to cast the current content type to [negotiate :: NegotiateRequest].
Sourcepub fn to_sessionsetup(self) -> Result<SessionSetupRequest, SmbMsgError>
pub fn to_sessionsetup(self) -> Result<SessionSetupRequest, SmbMsgError>
Attempts to cast the current content type to [session_setup :: SessionSetupRequest].
Sourcepub fn as_sessionsetup(&self) -> Result<&SessionSetupRequest, SmbMsgError>
pub fn as_sessionsetup(&self) -> Result<&SessionSetupRequest, SmbMsgError>
Attempts to cast the current content type to [session_setup :: SessionSetupRequest].
Sourcepub fn as_mut_sessionsetup(
&mut self,
) -> Result<&mut SessionSetupRequest, SmbMsgError>
pub fn as_mut_sessionsetup( &mut self, ) -> Result<&mut SessionSetupRequest, SmbMsgError>
Attempts to cast the current content type to [session_setup :: SessionSetupRequest].
Sourcepub fn to_logoff(self) -> Result<LogoffRequest, SmbMsgError>
pub fn to_logoff(self) -> Result<LogoffRequest, SmbMsgError>
Attempts to cast the current content type to [session_setup :: LogoffRequest].
Sourcepub fn as_logoff(&self) -> Result<&LogoffRequest, SmbMsgError>
pub fn as_logoff(&self) -> Result<&LogoffRequest, SmbMsgError>
Attempts to cast the current content type to [session_setup :: LogoffRequest].
Sourcepub fn as_mut_logoff(&mut self) -> Result<&mut LogoffRequest, SmbMsgError>
pub fn as_mut_logoff(&mut self) -> Result<&mut LogoffRequest, SmbMsgError>
Attempts to cast the current content type to [session_setup :: LogoffRequest].
Sourcepub fn to_treeconnect(self) -> Result<TreeConnectRequest, SmbMsgError>
pub fn to_treeconnect(self) -> Result<TreeConnectRequest, SmbMsgError>
Attempts to cast the current content type to [tree_connect :: TreeConnectRequest].
Sourcepub fn as_treeconnect(&self) -> Result<&TreeConnectRequest, SmbMsgError>
pub fn as_treeconnect(&self) -> Result<&TreeConnectRequest, SmbMsgError>
Attempts to cast the current content type to [tree_connect :: TreeConnectRequest].
Sourcepub fn as_mut_treeconnect(
&mut self,
) -> Result<&mut TreeConnectRequest, SmbMsgError>
pub fn as_mut_treeconnect( &mut self, ) -> Result<&mut TreeConnectRequest, SmbMsgError>
Attempts to cast the current content type to [tree_connect :: TreeConnectRequest].
Sourcepub fn to_treedisconnect(self) -> Result<TreeDisconnectRequest, SmbMsgError>
pub fn to_treedisconnect(self) -> Result<TreeDisconnectRequest, SmbMsgError>
Attempts to cast the current content type to [tree_connect :: TreeDisconnectRequest].
Sourcepub fn as_treedisconnect(&self) -> Result<&TreeDisconnectRequest, SmbMsgError>
pub fn as_treedisconnect(&self) -> Result<&TreeDisconnectRequest, SmbMsgError>
Attempts to cast the current content type to [tree_connect :: TreeDisconnectRequest].
Sourcepub fn as_mut_treedisconnect(
&mut self,
) -> Result<&mut TreeDisconnectRequest, SmbMsgError>
pub fn as_mut_treedisconnect( &mut self, ) -> Result<&mut TreeDisconnectRequest, SmbMsgError>
Attempts to cast the current content type to [tree_connect :: TreeDisconnectRequest].
Sourcepub fn to_create(self) -> Result<CreateRequest, SmbMsgError>
pub fn to_create(self) -> Result<CreateRequest, SmbMsgError>
Attempts to cast the current content type to [create :: CreateRequest].
Sourcepub fn as_create(&self) -> Result<&CreateRequest, SmbMsgError>
pub fn as_create(&self) -> Result<&CreateRequest, SmbMsgError>
Attempts to cast the current content type to [create :: CreateRequest].
Sourcepub fn as_mut_create(&mut self) -> Result<&mut CreateRequest, SmbMsgError>
pub fn as_mut_create(&mut self) -> Result<&mut CreateRequest, SmbMsgError>
Attempts to cast the current content type to [create :: CreateRequest].
Sourcepub fn to_close(self) -> Result<CloseRequest, SmbMsgError>
pub fn to_close(self) -> Result<CloseRequest, SmbMsgError>
Attempts to cast the current content type to [create :: CloseRequest].
Sourcepub fn as_close(&self) -> Result<&CloseRequest, SmbMsgError>
pub fn as_close(&self) -> Result<&CloseRequest, SmbMsgError>
Attempts to cast the current content type to [create :: CloseRequest].
Sourcepub fn as_mut_close(&mut self) -> Result<&mut CloseRequest, SmbMsgError>
pub fn as_mut_close(&mut self) -> Result<&mut CloseRequest, SmbMsgError>
Attempts to cast the current content type to [create :: CloseRequest].
Sourcepub fn to_flush(self) -> Result<FlushRequest, SmbMsgError>
pub fn to_flush(self) -> Result<FlushRequest, SmbMsgError>
Attempts to cast the current content type to [file :: FlushRequest].
Sourcepub fn as_flush(&self) -> Result<&FlushRequest, SmbMsgError>
pub fn as_flush(&self) -> Result<&FlushRequest, SmbMsgError>
Attempts to cast the current content type to [file :: FlushRequest].
Sourcepub fn as_mut_flush(&mut self) -> Result<&mut FlushRequest, SmbMsgError>
pub fn as_mut_flush(&mut self) -> Result<&mut FlushRequest, SmbMsgError>
Attempts to cast the current content type to [file :: FlushRequest].
Sourcepub fn to_read(self) -> Result<ReadRequest, SmbMsgError>
pub fn to_read(self) -> Result<ReadRequest, SmbMsgError>
Attempts to cast the current content type to [file :: ReadRequest].
Sourcepub fn as_read(&self) -> Result<&ReadRequest, SmbMsgError>
pub fn as_read(&self) -> Result<&ReadRequest, SmbMsgError>
Attempts to cast the current content type to [file :: ReadRequest].
Sourcepub fn as_mut_read(&mut self) -> Result<&mut ReadRequest, SmbMsgError>
pub fn as_mut_read(&mut self) -> Result<&mut ReadRequest, SmbMsgError>
Attempts to cast the current content type to [file :: ReadRequest].
Sourcepub fn to_write(self) -> Result<WriteRequest, SmbMsgError>
pub fn to_write(self) -> Result<WriteRequest, SmbMsgError>
Attempts to cast the current content type to [file :: WriteRequest].
Sourcepub fn as_write(&self) -> Result<&WriteRequest, SmbMsgError>
pub fn as_write(&self) -> Result<&WriteRequest, SmbMsgError>
Attempts to cast the current content type to [file :: WriteRequest].
Sourcepub fn as_mut_write(&mut self) -> Result<&mut WriteRequest, SmbMsgError>
pub fn as_mut_write(&mut self) -> Result<&mut WriteRequest, SmbMsgError>
Attempts to cast the current content type to [file :: WriteRequest].
Sourcepub fn to_lock(self) -> Result<LockRequest, SmbMsgError>
pub fn to_lock(self) -> Result<LockRequest, SmbMsgError>
Attempts to cast the current content type to [lock :: LockRequest].
Sourcepub fn as_lock(&self) -> Result<&LockRequest, SmbMsgError>
pub fn as_lock(&self) -> Result<&LockRequest, SmbMsgError>
Attempts to cast the current content type to [lock :: LockRequest].
Sourcepub fn as_mut_lock(&mut self) -> Result<&mut LockRequest, SmbMsgError>
pub fn as_mut_lock(&mut self) -> Result<&mut LockRequest, SmbMsgError>
Attempts to cast the current content type to [lock :: LockRequest].
Sourcepub fn to_ioctl(self) -> Result<IoctlRequest, SmbMsgError>
pub fn to_ioctl(self) -> Result<IoctlRequest, SmbMsgError>
Attempts to cast the current content type to [ioctl :: IoctlRequest].
Sourcepub fn as_ioctl(&self) -> Result<&IoctlRequest, SmbMsgError>
pub fn as_ioctl(&self) -> Result<&IoctlRequest, SmbMsgError>
Attempts to cast the current content type to [ioctl :: IoctlRequest].
Sourcepub fn as_mut_ioctl(&mut self) -> Result<&mut IoctlRequest, SmbMsgError>
pub fn as_mut_ioctl(&mut self) -> Result<&mut IoctlRequest, SmbMsgError>
Attempts to cast the current content type to [ioctl :: IoctlRequest].
Sourcepub fn to_echo(self) -> Result<EchoRequest, SmbMsgError>
pub fn to_echo(self) -> Result<EchoRequest, SmbMsgError>
Attempts to cast the current content type to [echo :: EchoRequest].
Sourcepub fn as_echo(&self) -> Result<&EchoRequest, SmbMsgError>
pub fn as_echo(&self) -> Result<&EchoRequest, SmbMsgError>
Attempts to cast the current content type to [echo :: EchoRequest].
Sourcepub fn as_mut_echo(&mut self) -> Result<&mut EchoRequest, SmbMsgError>
pub fn as_mut_echo(&mut self) -> Result<&mut EchoRequest, SmbMsgError>
Attempts to cast the current content type to [echo :: EchoRequest].
Sourcepub fn to_querydirectory(self) -> Result<QueryDirectoryRequest, SmbMsgError>
pub fn to_querydirectory(self) -> Result<QueryDirectoryRequest, SmbMsgError>
Attempts to cast the current content type to [query_dir :: QueryDirectoryRequest].
Sourcepub fn as_querydirectory(&self) -> Result<&QueryDirectoryRequest, SmbMsgError>
pub fn as_querydirectory(&self) -> Result<&QueryDirectoryRequest, SmbMsgError>
Attempts to cast the current content type to [query_dir :: QueryDirectoryRequest].
Sourcepub fn as_mut_querydirectory(
&mut self,
) -> Result<&mut QueryDirectoryRequest, SmbMsgError>
pub fn as_mut_querydirectory( &mut self, ) -> Result<&mut QueryDirectoryRequest, SmbMsgError>
Attempts to cast the current content type to [query_dir :: QueryDirectoryRequest].
Sourcepub fn to_changenotify(self) -> Result<ChangeNotifyRequest, SmbMsgError>
pub fn to_changenotify(self) -> Result<ChangeNotifyRequest, SmbMsgError>
Attempts to cast the current content type to [notify :: ChangeNotifyRequest].
Sourcepub fn as_changenotify(&self) -> Result<&ChangeNotifyRequest, SmbMsgError>
pub fn as_changenotify(&self) -> Result<&ChangeNotifyRequest, SmbMsgError>
Attempts to cast the current content type to [notify :: ChangeNotifyRequest].
Sourcepub fn as_mut_changenotify(
&mut self,
) -> Result<&mut ChangeNotifyRequest, SmbMsgError>
pub fn as_mut_changenotify( &mut self, ) -> Result<&mut ChangeNotifyRequest, SmbMsgError>
Attempts to cast the current content type to [notify :: ChangeNotifyRequest].
Sourcepub fn to_queryinfo(self) -> Result<QueryInfoRequest, SmbMsgError>
pub fn to_queryinfo(self) -> Result<QueryInfoRequest, SmbMsgError>
Attempts to cast the current content type to [info :: QueryInfoRequest].
Sourcepub fn as_queryinfo(&self) -> Result<&QueryInfoRequest, SmbMsgError>
pub fn as_queryinfo(&self) -> Result<&QueryInfoRequest, SmbMsgError>
Attempts to cast the current content type to [info :: QueryInfoRequest].
Sourcepub fn as_mut_queryinfo(&mut self) -> Result<&mut QueryInfoRequest, SmbMsgError>
pub fn as_mut_queryinfo(&mut self) -> Result<&mut QueryInfoRequest, SmbMsgError>
Attempts to cast the current content type to [info :: QueryInfoRequest].
Sourcepub fn to_setinfo(self) -> Result<SetInfoRequest, SmbMsgError>
pub fn to_setinfo(self) -> Result<SetInfoRequest, SmbMsgError>
Attempts to cast the current content type to [info :: SetInfoRequest].
Sourcepub fn as_setinfo(&self) -> Result<&SetInfoRequest, SmbMsgError>
pub fn as_setinfo(&self) -> Result<&SetInfoRequest, SmbMsgError>
Attempts to cast the current content type to [info :: SetInfoRequest].
Sourcepub fn as_mut_setinfo(&mut self) -> Result<&mut SetInfoRequest, SmbMsgError>
pub fn as_mut_setinfo(&mut self) -> Result<&mut SetInfoRequest, SmbMsgError>
Attempts to cast the current content type to [info :: SetInfoRequest].
Sourcepub fn to_cancel(self) -> Result<CancelRequest, SmbMsgError>
pub fn to_cancel(self) -> Result<CancelRequest, SmbMsgError>
Attempts to cast the current content type to [cancel :: CancelRequest].
Sourcepub fn as_cancel(&self) -> Result<&CancelRequest, SmbMsgError>
pub fn as_cancel(&self) -> Result<&CancelRequest, SmbMsgError>
Attempts to cast the current content type to [cancel :: CancelRequest].
Sourcepub fn as_mut_cancel(&mut self) -> Result<&mut CancelRequest, SmbMsgError>
pub fn as_mut_cancel(&mut self) -> Result<&mut CancelRequest, SmbMsgError>
Attempts to cast the current content type to [cancel :: CancelRequest].
Sourcepub fn to_oplockbreakack(self) -> Result<OplockBreakAck, SmbMsgError>
pub fn to_oplockbreakack(self) -> Result<OplockBreakAck, SmbMsgError>
Attempts to cast the current content type to [oplock :: OplockBreakAck].
Sourcepub fn as_oplockbreakack(&self) -> Result<&OplockBreakAck, SmbMsgError>
pub fn as_oplockbreakack(&self) -> Result<&OplockBreakAck, SmbMsgError>
Attempts to cast the current content type to [oplock :: OplockBreakAck].
Sourcepub fn as_mut_oplockbreakack(
&mut self,
) -> Result<&mut OplockBreakAck, SmbMsgError>
pub fn as_mut_oplockbreakack( &mut self, ) -> Result<&mut OplockBreakAck, SmbMsgError>
Attempts to cast the current content type to [oplock :: OplockBreakAck].
Sourcepub fn to_leasebreakack(self) -> Result<LeaseBreakAck, SmbMsgError>
pub fn to_leasebreakack(self) -> Result<LeaseBreakAck, SmbMsgError>
Attempts to cast the current content type to [oplock :: LeaseBreakAck].
Sourcepub fn as_leasebreakack(&self) -> Result<&LeaseBreakAck, SmbMsgError>
pub fn as_leasebreakack(&self) -> Result<&LeaseBreakAck, SmbMsgError>
Attempts to cast the current content type to [oplock :: LeaseBreakAck].
Sourcepub fn as_mut_leasebreakack(
&mut self,
) -> Result<&mut LeaseBreakAck, SmbMsgError>
pub fn as_mut_leasebreakack( &mut self, ) -> Result<&mut LeaseBreakAck, SmbMsgError>
Attempts to cast the current content type to [oplock :: LeaseBreakAck].
Source§impl RequestContent
impl RequestContent
Sourcepub fn req_payload_size(&self) -> u32
pub fn req_payload_size(&self) -> u32
If this is a request has a payload, it returns the size of it. Otherwise, it returns 0.
This method shall be used for calculating credits request & charge.
Sourcepub fn expected_resp_size(&self) -> u32
pub fn expected_resp_size(&self) -> u32
If this is a request that expects a response with size, it returns that expected size.
This method shall be used for calculating credits request & charge.
Trait Implementations§
Source§impl BinRead for RequestContent
impl BinRead for RequestContent
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 RequestContent
impl BinWrite for RequestContent
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 more