ResponseContent

Enum ResponseContent 

Source
pub enum ResponseContent {
Show 23 variants Negotiate(NegotiateResponse), SessionSetup(SessionSetupResponse), Logoff(LogoffResponse), TreeConnect(TreeConnectResponse), TreeDisconnect(TreeDisconnectResponse), Create(CreateResponse), Close(CloseResponse), Flush(FlushResponse), Read(ReadResponse), Write(WriteResponse), Lock(LockResponse), Ioctl(IoctlResponse), Echo(EchoResponse), QueryDirectory(QueryDirectoryResponse), ChangeNotify(ChangeNotifyResponse), QueryInfo(QueryInfoResponse), SetInfo(SetInfoResponse), OplockBreakNotify(OplockBreakNotify), LeaseBreakNotify(LeaseBreakNotify), OplockBreak(OplockBreakResponse), LeaseBreak(LeaseBreakResponse), ServerToClientNotification(ServerToClientNotification), Error(ErrorResponse),
}

Variants§

Implementations§

Source§

impl ResponseContent

Source

pub fn associated_cmd(&self) -> Command

Get the command associated with this content.

Source§

impl ResponseContent

Source

pub fn content_name(&self) -> &'static str

Returns the name of the content value.

Source

pub fn to_negotiate(self) -> Result<NegotiateResponse, SmbMsgError>

Attempts to cast the current content type to [negotiate :: NegotiateResponse].

Source

pub fn as_negotiate(&self) -> Result<&NegotiateResponse, SmbMsgError>

Attempts to cast the current content type to [negotiate :: NegotiateResponse].

Source

pub fn as_mut_negotiate( &mut self, ) -> Result<&mut NegotiateResponse, SmbMsgError>

Attempts to cast the current content type to [negotiate :: NegotiateResponse].

Source

pub fn to_sessionsetup(self) -> Result<SessionSetupResponse, SmbMsgError>

Attempts to cast the current content type to [session_setup :: SessionSetupResponse].

Source

pub fn as_sessionsetup(&self) -> Result<&SessionSetupResponse, SmbMsgError>

Attempts to cast the current content type to [session_setup :: SessionSetupResponse].

Source

pub fn as_mut_sessionsetup( &mut self, ) -> Result<&mut SessionSetupResponse, SmbMsgError>

Attempts to cast the current content type to [session_setup :: SessionSetupResponse].

Source

pub fn to_logoff(self) -> Result<LogoffResponse, SmbMsgError>

Attempts to cast the current content type to [session_setup :: LogoffResponse].

Source

pub fn as_logoff(&self) -> Result<&LogoffResponse, SmbMsgError>

Attempts to cast the current content type to [session_setup :: LogoffResponse].

Source

pub fn as_mut_logoff(&mut self) -> Result<&mut LogoffResponse, SmbMsgError>

Attempts to cast the current content type to [session_setup :: LogoffResponse].

Source

pub fn to_treeconnect(self) -> Result<TreeConnectResponse, SmbMsgError>

Attempts to cast the current content type to [tree_connect :: TreeConnectResponse].

Source

pub fn as_treeconnect(&self) -> Result<&TreeConnectResponse, SmbMsgError>

Attempts to cast the current content type to [tree_connect :: TreeConnectResponse].

Source

pub fn as_mut_treeconnect( &mut self, ) -> Result<&mut TreeConnectResponse, SmbMsgError>

Attempts to cast the current content type to [tree_connect :: TreeConnectResponse].

Source

pub fn to_treedisconnect(self) -> Result<TreeDisconnectResponse, SmbMsgError>

Attempts to cast the current content type to [tree_connect :: TreeDisconnectResponse].

Source

pub fn as_treedisconnect(&self) -> Result<&TreeDisconnectResponse, SmbMsgError>

Attempts to cast the current content type to [tree_connect :: TreeDisconnectResponse].

Source

pub fn as_mut_treedisconnect( &mut self, ) -> Result<&mut TreeDisconnectResponse, SmbMsgError>

Attempts to cast the current content type to [tree_connect :: TreeDisconnectResponse].

Source

pub fn to_create(self) -> Result<CreateResponse, SmbMsgError>

Attempts to cast the current content type to [create :: CreateResponse].

Source

pub fn as_create(&self) -> Result<&CreateResponse, SmbMsgError>

Attempts to cast the current content type to [create :: CreateResponse].

Source

pub fn as_mut_create(&mut self) -> Result<&mut CreateResponse, SmbMsgError>

Attempts to cast the current content type to [create :: CreateResponse].

Source

pub fn to_close(self) -> Result<CloseResponse, SmbMsgError>

Attempts to cast the current content type to [create :: CloseResponse].

Source

pub fn as_close(&self) -> Result<&CloseResponse, SmbMsgError>

Attempts to cast the current content type to [create :: CloseResponse].

Source

pub fn as_mut_close(&mut self) -> Result<&mut CloseResponse, SmbMsgError>

Attempts to cast the current content type to [create :: CloseResponse].

Source

pub fn to_flush(self) -> Result<FlushResponse, SmbMsgError>

Attempts to cast the current content type to [file :: FlushResponse].

Source

pub fn as_flush(&self) -> Result<&FlushResponse, SmbMsgError>

Attempts to cast the current content type to [file :: FlushResponse].

Source

pub fn as_mut_flush(&mut self) -> Result<&mut FlushResponse, SmbMsgError>

Attempts to cast the current content type to [file :: FlushResponse].

Source

pub fn to_read(self) -> Result<ReadResponse, SmbMsgError>

Attempts to cast the current content type to [file :: ReadResponse].

Source

pub fn as_read(&self) -> Result<&ReadResponse, SmbMsgError>

Attempts to cast the current content type to [file :: ReadResponse].

Source

pub fn as_mut_read(&mut self) -> Result<&mut ReadResponse, SmbMsgError>

Attempts to cast the current content type to [file :: ReadResponse].

Source

pub fn to_write(self) -> Result<WriteResponse, SmbMsgError>

Attempts to cast the current content type to [file :: WriteResponse].

Source

pub fn as_write(&self) -> Result<&WriteResponse, SmbMsgError>

Attempts to cast the current content type to [file :: WriteResponse].

Source

pub fn as_mut_write(&mut self) -> Result<&mut WriteResponse, SmbMsgError>

Attempts to cast the current content type to [file :: WriteResponse].

Source

pub fn to_lock(self) -> Result<LockResponse, SmbMsgError>

Attempts to cast the current content type to [lock :: LockResponse].

Source

pub fn as_lock(&self) -> Result<&LockResponse, SmbMsgError>

Attempts to cast the current content type to [lock :: LockResponse].

Source

pub fn as_mut_lock(&mut self) -> Result<&mut LockResponse, SmbMsgError>

Attempts to cast the current content type to [lock :: LockResponse].

Source

pub fn to_ioctl(self) -> Result<IoctlResponse, SmbMsgError>

Attempts to cast the current content type to [ioctl :: IoctlResponse].

Source

pub fn as_ioctl(&self) -> Result<&IoctlResponse, SmbMsgError>

Attempts to cast the current content type to [ioctl :: IoctlResponse].

Source

pub fn as_mut_ioctl(&mut self) -> Result<&mut IoctlResponse, SmbMsgError>

Attempts to cast the current content type to [ioctl :: IoctlResponse].

Source

pub fn to_echo(self) -> Result<EchoResponse, SmbMsgError>

Attempts to cast the current content type to [echo :: EchoResponse].

Source

pub fn as_echo(&self) -> Result<&EchoResponse, SmbMsgError>

Attempts to cast the current content type to [echo :: EchoResponse].

Source

pub fn as_mut_echo(&mut self) -> Result<&mut EchoResponse, SmbMsgError>

Attempts to cast the current content type to [echo :: EchoResponse].

Source

pub fn to_querydirectory(self) -> Result<QueryDirectoryResponse, SmbMsgError>

Attempts to cast the current content type to [query_dir :: QueryDirectoryResponse].

Source

pub fn as_querydirectory(&self) -> Result<&QueryDirectoryResponse, SmbMsgError>

Attempts to cast the current content type to [query_dir :: QueryDirectoryResponse].

Source

pub fn as_mut_querydirectory( &mut self, ) -> Result<&mut QueryDirectoryResponse, SmbMsgError>

Attempts to cast the current content type to [query_dir :: QueryDirectoryResponse].

Source

pub fn to_changenotify(self) -> Result<ChangeNotifyResponse, SmbMsgError>

Attempts to cast the current content type to [notify :: ChangeNotifyResponse].

Source

pub fn as_changenotify(&self) -> Result<&ChangeNotifyResponse, SmbMsgError>

Attempts to cast the current content type to [notify :: ChangeNotifyResponse].

Source

pub fn as_mut_changenotify( &mut self, ) -> Result<&mut ChangeNotifyResponse, SmbMsgError>

Attempts to cast the current content type to [notify :: ChangeNotifyResponse].

Source

pub fn to_queryinfo(self) -> Result<QueryInfoResponse, SmbMsgError>

Attempts to cast the current content type to [info :: QueryInfoResponse].

Source

pub fn as_queryinfo(&self) -> Result<&QueryInfoResponse, SmbMsgError>

Attempts to cast the current content type to [info :: QueryInfoResponse].

Source

pub fn as_mut_queryinfo( &mut self, ) -> Result<&mut QueryInfoResponse, SmbMsgError>

Attempts to cast the current content type to [info :: QueryInfoResponse].

Source

pub fn to_setinfo(self) -> Result<SetInfoResponse, SmbMsgError>

Attempts to cast the current content type to [info :: SetInfoResponse].

Source

pub fn as_setinfo(&self) -> Result<&SetInfoResponse, SmbMsgError>

Attempts to cast the current content type to [info :: SetInfoResponse].

Source

pub fn as_mut_setinfo(&mut self) -> Result<&mut SetInfoResponse, SmbMsgError>

Attempts to cast the current content type to [info :: SetInfoResponse].

Source

pub fn to_oplockbreaknotify(self) -> Result<OplockBreakNotify, SmbMsgError>

Attempts to cast the current content type to [oplock :: OplockBreakNotify].

Source

pub fn as_oplockbreaknotify(&self) -> Result<&OplockBreakNotify, SmbMsgError>

Attempts to cast the current content type to [oplock :: OplockBreakNotify].

Source

pub fn as_mut_oplockbreaknotify( &mut self, ) -> Result<&mut OplockBreakNotify, SmbMsgError>

Attempts to cast the current content type to [oplock :: OplockBreakNotify].

Source

pub fn to_leasebreaknotify(self) -> Result<LeaseBreakNotify, SmbMsgError>

Attempts to cast the current content type to [oplock :: LeaseBreakNotify].

Source

pub fn as_leasebreaknotify(&self) -> Result<&LeaseBreakNotify, SmbMsgError>

Attempts to cast the current content type to [oplock :: LeaseBreakNotify].

Source

pub fn as_mut_leasebreaknotify( &mut self, ) -> Result<&mut LeaseBreakNotify, SmbMsgError>

Attempts to cast the current content type to [oplock :: LeaseBreakNotify].

Source

pub fn to_oplockbreak(self) -> Result<OplockBreakResponse, SmbMsgError>

Attempts to cast the current content type to [oplock :: OplockBreakResponse].

Source

pub fn as_oplockbreak(&self) -> Result<&OplockBreakResponse, SmbMsgError>

Attempts to cast the current content type to [oplock :: OplockBreakResponse].

Source

pub fn as_mut_oplockbreak( &mut self, ) -> Result<&mut OplockBreakResponse, SmbMsgError>

Attempts to cast the current content type to [oplock :: OplockBreakResponse].

Source

pub fn to_leasebreak(self) -> Result<LeaseBreakResponse, SmbMsgError>

Attempts to cast the current content type to [oplock :: LeaseBreakResponse].

Source

pub fn as_leasebreak(&self) -> Result<&LeaseBreakResponse, SmbMsgError>

Attempts to cast the current content type to [oplock :: LeaseBreakResponse].

Source

pub fn as_mut_leasebreak( &mut self, ) -> Result<&mut LeaseBreakResponse, SmbMsgError>

Attempts to cast the current content type to [oplock :: LeaseBreakResponse].

Source

pub fn to_servertoclientnotification( self, ) -> Result<ServerToClientNotification, SmbMsgError>

Attempts to cast the current content type to [notify :: ServerToClientNotification].

Source

pub fn as_servertoclientnotification( &self, ) -> Result<&ServerToClientNotification, SmbMsgError>

Attempts to cast the current content type to [notify :: ServerToClientNotification].

Source

pub fn as_mut_servertoclientnotification( &mut self, ) -> Result<&mut ServerToClientNotification, SmbMsgError>

Attempts to cast the current content type to [notify :: ServerToClientNotification].

Source

pub fn to_error(self) -> Result<ErrorResponse, SmbMsgError>

Attempts to cast the current content type to [error :: ErrorResponse].

Source

pub fn as_error(&self) -> Result<&ErrorResponse, SmbMsgError>

Attempts to cast the current content type to [error :: ErrorResponse].

Source

pub fn as_mut_error(&mut self) -> Result<&mut ErrorResponse, SmbMsgError>

Attempts to cast the current content type to [error :: ErrorResponse].

Trait Implementations§

Source§

impl BinRead for ResponseContent

Source§

type Args<'__binrw_generated_args_lifetime> = (&'__binrw_generated_args_lifetime Command,)

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<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self: ReadEndian, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default 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_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek, Self: ReadEndian,

Read Self from the reader using the given arguments. 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 ResponseContent

Source§

type Args<'__binrw_generated_args_lifetime> = (&'__binrw_generated_args_lifetime Command,)

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<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self: WriteEndian, Self::Args<'a>: for<'a> Required,

Write Self to the writer using default 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_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek, Self: WriteEndian,

Write Self to the writer using the given arguments. 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 Debug for ResponseContent

Source§

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

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

impl From<ChangeNotifyResponse> for ResponseContent

Source§

fn from(resp: ChangeNotifyResponse) -> Self

Converts to this type from the input type.
Source§

impl From<CloseResponse> for ResponseContent

Source§

fn from(resp: CloseResponse) -> Self

Converts to this type from the input type.
Source§

impl From<CreateResponse> for ResponseContent

Source§

fn from(resp: CreateResponse) -> Self

Converts to this type from the input type.
Source§

impl From<EchoMesasge> for ResponseContent

Source§

fn from(resp: EchoResponse) -> Self

Converts to this type from the input type.
Source§

impl From<FlushResponse> for ResponseContent

Source§

fn from(resp: FlushResponse) -> Self

Converts to this type from the input type.
Source§

impl From<IoctlResponse> for ResponseContent

Source§

fn from(resp: IoctlResponse) -> Self

Converts to this type from the input type.
Source§

impl From<LockResponse> for ResponseContent

Source§

fn from(resp: LockResponse) -> Self

Converts to this type from the input type.
Source§

impl From<LogoffResponse> for ResponseContent

Source§

fn from(resp: LogoffResponse) -> Self

Converts to this type from the input type.
Source§

impl From<NegotiateResponse> for ResponseContent

Source§

fn from(resp: NegotiateResponse) -> Self

Converts to this type from the input type.
Source§

impl From<QueryDirectoryResponse> for ResponseContent

Source§

fn from(resp: QueryDirectoryResponse) -> Self

Converts to this type from the input type.
Source§

impl From<QueryInfoResponse> for ResponseContent

Source§

fn from(resp: QueryInfoResponse) -> Self

Converts to this type from the input type.
Source§

impl From<ReadResponse> for ResponseContent

Source§

fn from(resp: ReadResponse) -> Self

Converts to this type from the input type.
Source§

impl From<SessionSetupResponse> for ResponseContent

Source§

fn from(resp: SessionSetupResponse) -> Self

Converts to this type from the input type.
Source§

impl From<SetInfoResponse> for ResponseContent

Source§

fn from(resp: SetInfoResponse) -> Self

Converts to this type from the input type.
Source§

impl From<TreeConnectResponse> for ResponseContent

Source§

fn from(resp: TreeConnectResponse) -> Self

Converts to this type from the input type.
Source§

impl From<TreeDisconnectResponse> for ResponseContent

Source§

fn from(resp: TreeDisconnectResponse) -> Self

Converts to this type from the input type.
Source§

impl From<WriteResponse> for ResponseContent

Source§

fn from(resp: WriteResponse) -> Self

Converts to this type from the input type.
Source§

impl ReadEndian for ResponseContent

Source§

const ENDIAN: EndianKind

The endianness of the type.
Source§

impl WriteEndian for ResponseContent

Source§

const ENDIAN: EndianKind

The endianness of the type.

Auto Trait Implementations§

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> 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, 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