pub struct OutputStream(/* private fields */);Expand description
output stream object.
Implementations§
Source§impl OutputStream
impl OutputStream
Sourcepub fn create_for_file_wide(
file_name: Vec<u32>,
overwrite: bool,
) -> Result<Self, Error>
pub fn create_for_file_wide( file_name: Vec<u32>, overwrite: bool, ) -> Result<Self, Error>
Create an output stream object for a file identified by its filename, which is given as a wide string. Note that wchar_t on Windows is 16-bit wide, and on Unix-like systems it is 32-bit wide.
\param filename Filename of the file which is to be opened (zero terminated wide string). Note that on Windows, this is a string with 16-bit code units, and on Unix-like systems it is typically a string with 32-bit code units. \param overwrite Indicates whether the file should be overwritten. \param [out] output_stream_object The output stream object that will hold the created stream.
\return An error-code that indicates whether the operation is successful or not. Non-positive values indicates successful, positive values indicates unsuccessful operation.
Sourcepub fn create_for_file_utf8<S: AsRef<str>>(
file_name: S,
overwrite: bool,
) -> Result<Self, Error>
pub fn create_for_file_utf8<S: AsRef<str>>( file_name: S, overwrite: bool, ) -> Result<Self, Error>
Create an input stream object for a file identified by its filename, which is given as an UTF8 - encoded string.
\param filename Filename of the file which is to be opened (in UTF8 encoding). \param overwrite Indicates whether the file should be overwritten. \param [out] output_stream_object The output stream object that will hold the created stream.
\return An error-code that indicates whether the operation is successful or not. Non-positive values indicates successful, positive values indicates unsuccessful operation.
Sourcepub fn release(&self) -> Result<(), Error>
pub fn release(&self) -> Result<(), Error>
Release the specified output stream object. After this function is called, the handle is no longer valid. Note that calling this function will only decrement the usage count of the underlying object; whereas the object itself (and the resources it holds) will only be released when the usage count reaches zero.
\param output_stream_object The output stream object.
\returns An error-code indicating success or failure of the operation.
Sourcepub fn create_from_external(
external_input_stream: ExternalOutputStreamStruct,
) -> Result<Self, Error>
pub fn create_from_external( external_input_stream: ExternalOutputStreamStruct, ) -> Result<Self, Error>
Create an output stream object which is using externally provided functions for operation and writing the data. Please refer to the documentation of ‘ExternalOutputStreamStructInterop’ for more information.
\param external_output_stream_struct Structure containing the information about the externally provided functions. \param [out] output_stream_object If successful, the handle to the newly created output stream object is put here.
\returns An error-code indicating success or failure of the operation.
Trait Implementations§
Source§impl Clone for OutputStream
impl Clone for OutputStream
Source§fn clone(&self) -> OutputStream
fn clone(&self) -> OutputStream
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more