pub trait IntoTryWriteFn<Ts> {
    type TryWriteFn;

    // Required method
    fn into_try_write_fn(self) -> Self::TryWriteFn;
}
Expand description

A trait used to inference type of fallible write closure wrapper.

This trait used by FmtTryWriter, ConcatTryWriter and IoTryWriter.

Both IntoWriteFn and IntoTryWriteFn traits provides the same wrappers for closures with *const u8, usize, &[u8], &str and String arguments. This variant uses non-panicking versions for closures with &CStr, CString, and *const c_char arguments.

Required Associated Types§

source

type TryWriteFn

The corresponding fallible write function wrapper.

Required Methods§

source

fn into_try_write_fn(self) -> Self::TryWriteFn

Returns the wrapped function.

Implementors§

source§

impl<F, R> IntoTryWriteFn<(&str,)> for Fwhere F: FnMut(&str) -> R,

source§

impl<F, R> IntoTryWriteFn<(&CStr,)> for Fwhere F: FnMut(&CStr) -> R,

source§

impl<F, R> IntoTryWriteFn<(&[u8],)> for Fwhere F: FnMut(&[u8]) -> R,

source§

impl<F, R> IntoTryWriteFn<(*const i8,)> for Fwhere F: FnMut(*const c_char) -> R,

source§

impl<F, R> IntoTryWriteFn<(*const u8, usize)> for Fwhere F: FnMut(*const u8, usize) -> R,

source§

impl<F, R> IntoTryWriteFn<(usize, *const u8)> for Fwhere F: FnMut(usize, *const u8) -> R,

source§

impl<F, R> IntoTryWriteFn<(CString,)> for Fwhere F: FnMut(CString) -> R,

source§

impl<F, R> IntoTryWriteFn<(String,)> for Fwhere F: FnMut(String) -> R,