Trait TryIntoFile

Source
pub trait TryIntoFile: Sized {
    type Error;

    // Required method
    fn try_into(self) -> Result<File, Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn try_into(self) -> Result<File, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> TryIntoFile for &'a str

Construct a Telegram file from a local path

Source§

impl<'a, S: Read + Send + 'static> TryIntoFile for (&'a str, S)

Construct a Telegram file from an object which implements the Read trait

Source§

type Error = Error

Source§

fn try_into(self) -> Result<File, Self::Error>
where S: Read,

Implementors§