pub enum CreateDisposition {
Superseded = 0,
Open = 1,
Create = 2,
OpenIf = 3,
Overwrite = 4,
OverwriteIf = 5,
}Expand description
Defines the action the server must take if the file already exists. For opening named pipes, this field can be set to any value and is ignored by the server.
Reference: MS-SMB2 2.2.13
Variants§
Superseded = 0
If the file already exists, supersede it. Otherwise, create the file
Open = 1
If the file already exists, return success; otherwise, fail the operation
Create = 2
If the file already exists, fail the operation; otherwise, create the file
OpenIf = 3
Open the file if it already exists; otherwise, create the file
Overwrite = 4
Overwrite the file if it already exists; otherwise, fail the operation
OverwriteIf = 5
Overwrite the file if it already exists; otherwise, create the file
Trait Implementations§
Source§impl BinRead for CreateDisposition
impl BinRead for CreateDisposition
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 CreateDisposition
impl BinWrite for CreateDisposition
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 Clone for CreateDisposition
impl Clone for CreateDisposition
Source§fn clone(&self) -> CreateDisposition
fn clone(&self) -> CreateDisposition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateDisposition
impl Debug for CreateDisposition
Source§impl Default for CreateDisposition
impl Default for CreateDisposition
Source§fn default() -> CreateDisposition
fn default() -> CreateDisposition
Returns the “default value” for a type. Read more
Source§impl PartialEq for CreateDisposition
impl PartialEq for CreateDisposition
impl Copy for CreateDisposition
impl Eq for CreateDisposition
impl StructuralPartialEq for CreateDisposition
Auto Trait Implementations§
impl Freeze for CreateDisposition
impl RefUnwindSafe for CreateDisposition
impl Send for CreateDisposition
impl Sync for CreateDisposition
impl Unpin for CreateDisposition
impl UnwindSafe for CreateDisposition
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