pub struct InputStream(/* private fields */);Expand description
input stream object.
Implementations§
Source§impl InputStream
impl InputStream
Sourcepub fn create(
stream_class_name: impl AsRef<str>,
creation_property_bag: impl AsRef<str>,
stream_identifier: impl AsRef<str>,
) -> Result<Self, Error>
pub fn create( stream_class_name: impl AsRef<str>, creation_property_bag: impl AsRef<str>, stream_identifier: impl AsRef<str>, ) -> Result<Self, Error>
Create an input stream object of the specified type, using the specified JSON-formatted property bag and the specified file identifier as input.
\param stream_class_name Name of the stream class to be instantiated. \param creation_property_bag JSON formatted string (containing additional parameters for the stream creation) in UTF8-encoding. \param stream_identifier The filename (or, more generally, a URI of some sort) identifying the file to be opened in UTF8-encoding. \param [out] stream_object If successful, a handle representing the newly created stream object is put here.
\returns An error-code that indicates whether the operation is successful or not.
Sourcepub fn create_from_file_wide(file_name: Vec<u32>) -> Result<Self, Error>
pub fn create_from_file_wide(file_name: Vec<u32>) -> Result<Self, Error>
Create an input 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 [in] 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 [out] 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_from_file_utf8<S: AsRef<str>>(file_name: S) -> Result<Self, Error>
pub fn create_from_file_utf8<S: AsRef<str>>(file_name: S) -> Result<Self, Error>
Create an input stream object for a file identified by its filename, which is given as an UTF8-encoded string.
\param [in] filename Filename of the file which is to be opened (in UTF8 encoding). \param [out] 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_from_external(
external_input_stream: ExternalInputStreamStruct,
) -> Result<Self, Error>
pub fn create_from_external( external_input_stream: ExternalInputStreamStruct, ) -> Result<Self, Error>
Create an input stream object which is using externally provided functions for operation and reading the data. Please refer to the documentation of ‘ExternalInputStreamStructInterop’ for more information.
\param external_input_stream_struct Structure containing the information about the externally provided functions. \param [out] stream_object If successful, the handle to the newly created input stream object is put here.
\returns An error-code indicating success or failure of the operation.
Sourcepub fn release(&self) -> Result<(), Error>
pub fn release(&self) -> Result<(), Error>
Release the specified input 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 stream_object The input stream object.
\returns An error-code indicating success or failure of the operation.
Trait Implementations§
Source§impl Clone for InputStream
impl Clone for InputStream
Source§fn clone(&self) -> InputStream
fn clone(&self) -> InputStream
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more