pub trait TryToCharacterStream<Reader: Read> {
// Required methods
fn try_to_character_stream(
&self,
) -> Result<CharacterStream<Reader>, Box<dyn Error>>;
fn try_to_character_stream_lossy(
&self,
) -> Result<CharacterStream<Reader>, Box<dyn Error>>;
}Expand description
Helper trait for converting values into a CharacterStream, with a potential for failure.
Required Methods§
Sourcefn try_to_character_stream(
&self,
) -> Result<CharacterStream<Reader>, Box<dyn Error>>
fn try_to_character_stream( &self, ) -> Result<CharacterStream<Reader>, Box<dyn Error>>
Attempt to convert into a CharacterStream.
Sourcefn try_to_character_stream_lossy(
&self,
) -> Result<CharacterStream<Reader>, Box<dyn Error>>
fn try_to_character_stream_lossy( &self, ) -> Result<CharacterStream<Reader>, Box<dyn Error>>
Attempt to convert into a lossy CharacterStream.