Trait nom::lib::std::convert::From1.0.0[][src]

pub trait From<T> {
#[lang = "from"]    pub fn from(T) -> Self;
}
[]

Used to do value-to-value conversions while consuming the input value. It is the reciprocal of Into.

One should always prefer implementing From over Into because implementing From automatically provides one with an implementation of Into thanks to the blanket implementation in the standard library.

Only implement Into when targeting a version prior to Rust 1.41 and converting to a type outside the current crate. From was not able to do these types of conversions in earlier versions because of Rust’s orphaning rules. See Into for more details.

Prefer using Into over using From when specifying trait bounds on a generic function. This way, types that directly implement Into can be used as arguments as well.

The From is also very useful when performing error handling. When constructing a function that is capable of failing, the return type will generally be of the form Result<T, E>. The From trait simplifies error handling by allowing a function to return a single error type that encapsulate multiple error types. See the “Examples” section and the book for more details.

Note: This trait must not fail. If the conversion can fail, use TryFrom.

Generic Implementations

Examples

String implements From<&str>:

An explicit conversion from a &str to a String is done as follows:

let string = "hello".to_string();
let other_string = String::from("hello");

assert_eq!(string, other_string);

While performing error handling it is often useful to implement From for your own error type. By converting underlying error types to our own custom error type that encapsulates the underlying error type, we can return a single error type without losing information on the underlying cause. The ‘?’ operator automatically converts the underlying error type to our custom error type by calling Into<CliError>::into which is automatically provided when implementing From. The compiler then infers which implementation of Into should be used.

use std::fs;
use std::io;
use std::num;

enum CliError {
    IoError(io::Error),
    ParseError(num::ParseIntError),
}

impl From<io::Error> for CliError {
    fn from(error: io::Error) -> Self {
        CliError::IoError(error)
    }
}

impl From<num::ParseIntError> for CliError {
    fn from(error: num::ParseIntError) -> Self {
        CliError::ParseError(error)
    }
}

fn open_and_parse_file(file_name: &str) -> Result<i32, CliError> {
    let mut contents = fs::read_to_string(&file_name)?;
    let num: i32 = contents.trim().parse()?;
    Ok(num)
}

Required methods

#[lang = "from"]pub fn from(T) -> Self[src][]

Performs the conversion.

Implementations on Foreign Types

impl<'_> From<&'_ CStr> for Arc<CStr>[src][]

impl From<u128> for Ipv6Addr[src][]

pub fn from(ip: u128) -> Ipv6Addr[src][]

Convert a host byte order u128 into an Ipv6Addr.

Examples

use std::net::Ipv6Addr;

let addr = Ipv6Addr::from(0x102030405060708090A0B0C0D0E0F00D_u128);
assert_eq!(
    Ipv6Addr::new(
        0x1020, 0x3040, 0x5060, 0x7080,
        0x90A0, 0xB0C0, 0xD0E0, 0xF00D,
    ),
    addr);

impl From<ErrorKind> for Error[src][]

[]

Intended for use for errors not exposed to the user, where allocating onto the heap (for normal construction via Error::new) is too costly.

pub fn from(kind: ErrorKind) -> Error[src][]

Converts an ErrorKind into an Error.

This conversion allocates a new error with a simple representation of error kind.

Examples

use std::io::{Error, ErrorKind};

let not_found = ErrorKind::NotFound;
let error = Error::from(not_found);
assert_eq!("entity not found", format!("{}", error));

impl From<Ipv6Addr> for IpAddr[src][]

pub fn from(ipv6: Ipv6Addr) -> IpAddr[src][]

Copies this address to a new IpAddr::V6.

Examples

use std::net::{IpAddr, Ipv6Addr};

let addr = Ipv6Addr::new(0, 0, 0, 0, 0, 0xffff, 0xc00a, 0x2ff);

assert_eq!(
    IpAddr::V6(addr),
    IpAddr::from(addr)
);

impl From<Ipv6Addr> for u128[src][]

pub fn from(ip: Ipv6Addr) -> u128[src][]

Convert an Ipv6Addr into a host byte order u128.

Examples

use std::net::Ipv6Addr;

let addr = Ipv6Addr::new(
    0x1020, 0x3040, 0x5060, 0x7080,
    0x90A0, 0xB0C0, 0xD0E0, 0xF00D,
);
assert_eq!(0x102030405060708090A0B0C0D0E0F00D_u128, u128::from(addr));

impl From<[u16; 8]> for IpAddr[src][]

pub fn from(segments: [u16; 8]) -> IpAddr[src][]

Creates an IpAddr::V6 from an eight element 16-bit array.

Examples

use std::net::{IpAddr, Ipv6Addr};

let addr = IpAddr::from([
    525u16, 524u16, 523u16, 522u16,
    521u16, 520u16, 519u16, 518u16,
]);
assert_eq!(
    IpAddr::V6(Ipv6Addr::new(
        0x20d, 0x20c,
        0x20b, 0x20a,
        0x209, 0x208,
        0x207, 0x206
    )),
    addr
);

impl From<String> for OsString[src][]

pub fn from(s: String) -> OsString[src][]

Converts a String into a OsString.

This conversion does not allocate or copy memory.

impl From<OsString> for Rc<OsStr>[src][]

pub fn from(s: OsString) -> Rc<OsStr>[src][]

Converts a OsString into a Rc<OsStr> without copying or allocating.

impl From<CString> for Arc<CStr>[src][]

pub fn from(s: CString) -> Arc<CStr>[src][]

Converts a CString into a Arc<CStr> without copying or allocating.

impl From<Box<OsStr, Global>> for OsString[src][]

pub fn from(boxed: Box<OsStr, Global>) -> OsString[src][]

Converts a Box<OsStr> into an OsString without copying or allocating.

impl From<SocketAddrV6> for SocketAddr[src][]

pub fn from(sock6: SocketAddrV6) -> SocketAddr[src][]

Converts a SocketAddrV6 into a SocketAddr::V6.

impl<T> From<SendError<T>> for TrySendError<T>[src][]

pub fn from(err: SendError<T>) -> TrySendError<T>[src][]

Converts a SendError<T> into a TrySendError<T>.

This conversion always returns a TrySendError::Disconnected containing the data in the SendError<T>.

No data is allocated on the heap.

impl From<PathBuf> for Rc<Path>[src][]

pub fn from(s: PathBuf) -> Rc<Path>[src][]

Converts a PathBuf into an Rc by moving the PathBuf data into a new Rc buffer.

impl From<Ipv4Addr> for IpAddr[src][]

pub fn from(ipv4: Ipv4Addr) -> IpAddr[src][]

Copies this address to a new IpAddr::V4.

Examples

use std::net::{IpAddr, Ipv4Addr};

let addr = Ipv4Addr::new(127, 0, 0, 1);

assert_eq!(
    IpAddr::V4(addr),
    IpAddr::from(addr)
)

impl<'a> From<Cow<'a, CStr>> for CString[src][]

impl<T> From<PoisonError<T>> for TryLockError<T>[src][]

impl<'_> From<&'_ CStr> for CString[src][]

impl From<Box<CStr, Global>> for CString[src][]

pub fn from(s: Box<CStr, Global>) -> CString[src][]

Converts a Box<CStr> into a CString without copying or allocating.

impl From<[u8; 4]> for IpAddr[src][]

pub fn from(octets: [u8; 4]) -> IpAddr[src][]

Creates an IpAddr::V4 from a four element byte array.

Examples

use std::net::{IpAddr, Ipv4Addr};

let addr = IpAddr::from([13u8, 12u8, 11u8, 10u8]);
assert_eq!(IpAddr::V4(Ipv4Addr::new(13, 12, 11, 10)), addr);

impl<T> From<T> for SyncOnceCell<T>[src][]

impl From<NulError> for Error[src][]

pub fn from(NulError) -> Error[src][]

Converts a NulError into a io::Error.

impl<'_> From<&'_ OsStr> for Rc<OsStr>[src][]

impl From<PathBuf> for Arc<Path>[src][]

pub fn from(s: PathBuf) -> Arc<Path>[src][]

Converts a PathBuf into an Arc by moving the PathBuf data into a new Arc buffer.

impl<'_> From<&'_ Path> for Rc<Path>[src][]

pub fn from(s: &Path) -> Rc<Path>[src][]

Converts a Path into an Rc by copying the Path data into a new Rc buffer.

impl From<OsString> for PathBuf[src][]

pub fn from(s: OsString) -> PathBuf[src][]

Converts an OsString into a PathBuf

This conversion does not allocate or copy memory.

impl From<PathBuf> for OsString[src][]

pub fn from(path_buf: PathBuf) -> OsString[src][]

Converts a PathBuf into an OsString

This conversion does not allocate or copy memory.

impl<'a> From<Cow<'a, Path>> for PathBuf[src][]

impl From<[u8; 16]> for IpAddr[src][]

pub fn from(octets: [u8; 16]) -> IpAddr[src][]

Creates an IpAddr::V6 from a sixteen element byte array.

Examples

use std::net::{IpAddr, Ipv6Addr};

let addr = IpAddr::from([
    25u8, 24u8, 23u8, 22u8, 21u8, 20u8, 19u8, 18u8,
    17u8, 16u8, 15u8, 14u8, 13u8, 12u8, 11u8, 10u8,
]);
assert_eq!(
    IpAddr::V6(Ipv6Addr::new(
        0x1918, 0x1716,
        0x1514, 0x1312,
        0x1110, 0x0f0e,
        0x0d0c, 0x0b0a
    )),
    addr
);

impl<'_> From<&'_ Path> for Arc<Path>[src][]

pub fn from(s: &Path) -> Arc<Path>[src][]

Converts a Path into an Arc by copying the Path data into a new Arc buffer.

impl<T> From<T> for RwLock<T>[src][]

pub fn from(t: T) -> RwLock<T>[src][]

Creates a new instance of an RwLock<T> which is unlocked. This is equivalent to RwLock::new.

impl<'a> From<Cow<'a, OsStr>> for OsString[src][]

impl From<String> for PathBuf[src][]

pub fn from(s: String) -> PathBuf[src][]

Converts a String into a PathBuf

This conversion does not allocate or copy memory.

impl From<RecvError> for TryRecvError[src][]

pub fn from(err: RecvError) -> TryRecvError[src][]

Converts a RecvError into a TryRecvError.

This conversion always returns TryRecvError::Disconnected.

No data is allocated on the heap.

impl<'_, T> From<&'_ T> for PathBuf where
    T: AsRef<OsStr> + ?Sized
[src][]

impl<'_> From<&'_ CStr> for Rc<CStr>[src][]

impl<'_> From<&'_ OsStr> for Arc<OsStr>[src][]

impl From<u32> for Ipv4Addr[src][]

pub fn from(ip: u32) -> Ipv4Addr[src][]

Converts a host byte order u32 into an Ipv4Addr.

Examples

use std::net::Ipv4Addr;

let addr = Ipv4Addr::from(0xcafebabe);
assert_eq!(Ipv4Addr::new(0xca, 0xfe, 0xba, 0xbe), addr);

impl From<Vec<NonZeroU8, Global>> for CString[src][]

pub fn from(v: Vec<NonZeroU8, Global>) -> CString[src][]

Converts a Vec<NonZeroU8> into a CString without copying nor checking for inner null bytes.

impl<W> From<IntoInnerError<W>> for Error[src][]

impl<T> From<T> for Mutex<T>[src][]

pub fn from(t: T) -> Mutex<T>[src][]

Creates a new mutex in an unlocked state ready for use. This is equivalent to Mutex::new.

impl From<RecvError> for RecvTimeoutError[src][]

pub fn from(err: RecvError) -> RecvTimeoutError[src][]

Converts a RecvError into a RecvTimeoutError.

This conversion always returns RecvTimeoutError::Disconnected.

No data is allocated on the heap.

impl From<SocketAddrV4> for SocketAddr[src][]

pub fn from(sock4: SocketAddrV4) -> SocketAddr[src][]

Converts a SocketAddrV4 into a SocketAddr::V4.

impl From<File> for Stdio[src][]

pub fn from(file: File) -> Stdio[src][]

Converts a File into a Stdio

Examples

File will be converted to Stdio using Stdio::from under the hood.

use std::fs::File;
use std::process::Command;

// With the `foo.txt` file containing `Hello, world!"
let file = File::open("foo.txt").unwrap();

let reverse = Command::new("rev")
    .stdin(file)  // Implicit File conversion into a Stdio
    .output()
    .expect("failed reverse command");

assert_eq!(reverse.stdout, b"!dlrow ,olleH");

impl From<Box<Path, Global>> for PathBuf[src][]

pub fn from(boxed: Box<Path, Global>) -> PathBuf[src][]

Converts a Box<Path> into a PathBuf

This conversion does not allocate or copy memory.

impl<I> From<(I, u16)> for SocketAddr where
    I: Into<IpAddr>, 
[src][]

pub fn from(pieces: (I, u16)) -> SocketAddr[src][]

Converts a tuple struct (Into<IpAddr>, u16) into a SocketAddr.

This conversion creates a SocketAddr::V4 for a IpAddr::V4 and creates a SocketAddr::V6 for a IpAddr::V6.

u16 is treated as port of the newly created SocketAddr.

impl<'_, T> From<&'_ T> for OsString where
    T: AsRef<OsStr> + ?Sized
[src][]

impl From<CString> for Rc<CStr>[src][]

pub fn from(s: CString) -> Rc<CStr>[src][]

Converts a CString into a Rc<CStr> without copying or allocating.

impl From<OsString> for Arc<OsStr>[src][]

pub fn from(s: OsString) -> Arc<OsStr>[src][]

Converts a OsString into a Arc<OsStr> without copying or allocating.

impl From<[u8; 4]> for Ipv4Addr[src][]

pub fn from(octets: [u8; 4]) -> Ipv4Addr[src][]

Creates an Ipv4Addr from a four element byte array.

Examples

use std::net::Ipv4Addr;

let addr = Ipv4Addr::from([13u8, 12u8, 11u8, 10u8]);
assert_eq!(Ipv4Addr::new(13, 12, 11, 10), addr);

impl From<ChildStdin> for Stdio[src][]

pub fn from(child: ChildStdin) -> Stdio[src][]

Converts a ChildStdin into a Stdio

Examples

ChildStdin will be converted to Stdio using Stdio::from under the hood.

use std::process::{Command, Stdio};

let reverse = Command::new("rev")
    .stdin(Stdio::piped())
    .spawn()
    .expect("failed reverse command");

let _echo = Command::new("echo")
    .arg("Hello, world!")
    .stdout(reverse.stdin.unwrap()) // Converted into a Stdio here
    .output()
    .expect("failed echo command");

// "!dlrow ,olleH" echoed to console

impl From<ChildStderr> for Stdio[src][]

pub fn from(child: ChildStderr) -> Stdio[src][]

Converts a ChildStderr into a Stdio

Examples

use std::process::{Command, Stdio};

let reverse = Command::new("rev")
    .arg("non_existing_file.txt")
    .stderr(Stdio::piped())
    .spawn()
    .expect("failed reverse command");

let cat = Command::new("cat")
    .arg("-")
    .stdin(reverse.stderr.unwrap()) // Converted into a Stdio here
    .output()
    .expect("failed echo command");

assert_eq!(
    String::from_utf8_lossy(&cat.stdout),
    "rev: cannot open non_existing_file.txt: No such file or directory\n"
);

impl From<[u8; 16]> for Ipv6Addr[src][]

pub fn from(octets: [u8; 16]) -> Ipv6Addr[src][]

Creates an Ipv6Addr from a sixteen element byte array.

Examples

use std::net::Ipv6Addr;

let addr = Ipv6Addr::from([
    25u8, 24u8, 23u8, 22u8, 21u8, 20u8, 19u8, 18u8,
    17u8, 16u8, 15u8, 14u8, 13u8, 12u8, 11u8, 10u8,
]);
assert_eq!(
    Ipv6Addr::new(
        0x1918, 0x1716,
        0x1514, 0x1312,
        0x1110, 0x0f0e,
        0x0d0c, 0x0b0a
    ),
    addr
);

impl From<[u16; 8]> for Ipv6Addr[src][]

pub fn from(segments: [u16; 8]) -> Ipv6Addr[src][]

Creates an Ipv6Addr from an eight element 16-bit array.

Examples

use std::net::Ipv6Addr;

let addr = Ipv6Addr::from([
    525u16, 524u16, 523u16, 522u16,
    521u16, 520u16, 519u16, 518u16,
]);
assert_eq!(
    Ipv6Addr::new(
        0x20d, 0x20c,
        0x20b, 0x20a,
        0x209, 0x208,
        0x207, 0x206
    ),
    addr
);

impl From<Ipv4Addr> for u32[src][]

pub fn from(ip: Ipv4Addr) -> u32[src][]

Converts an Ipv4Addr into a host byte order u32.

Examples

use std::net::Ipv4Addr;

let addr = Ipv4Addr::new(0xca, 0xfe, 0xba, 0xbe);
assert_eq!(0xcafebabe, u32::from(addr));

impl From<ChildStdout> for Stdio[src][]

pub fn from(child: ChildStdout) -> Stdio[src][]

Converts a ChildStdout into a Stdio

Examples

ChildStdout will be converted to Stdio using Stdio::from under the hood.

use std::process::{Command, Stdio};

let hello = Command::new("echo")
    .arg("Hello, world!")
    .stdout(Stdio::piped())
    .spawn()
    .expect("failed echo command");

let reverse = Command::new("rev")
    .stdin(hello.stdout.unwrap())  // Converted into a Stdio here
    .output()
    .expect("failed reverse command");

assert_eq!(reverse.stdout, b"!dlrow ,olleH\n");

impl From<Infallible> for TryFromSliceError[src][]

impl From<NonZeroU32> for u32[src][]

pub fn from(nonzero: NonZeroU32) -> u32[src][]

Converts a NonZeroU32 into an u32

impl<'_, T> From<&'_ mut T> for NonNull<T> where
    T: ?Sized
[src][]

impl From<i16> for f64[src][]

[]

Converts i16 to f64 losslessly.

impl From<i32> for AtomicI32[src][]

pub fn from(v: i32) -> AtomicI32[src][]

Converts an i32 into an AtomicI32.

impl From<bool> for i8[src][]

[]

Converts a bool to a i8. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(i8::from(true), 1);
assert_eq!(i8::from(false), 0);

impl From<NonZeroU32> for NonZeroU64[src][]

[]

Converts NonZeroU32 to NonZeroU64 losslessly.

impl From<NonZeroU8> for NonZeroI128[src][]

[]

Converts NonZeroU8 to NonZeroI128 losslessly.

impl<T> From<Unique<T>> for NonNull<T> where
    T: ?Sized
[src][]

impl From<i8> for AtomicI8[src][]

pub fn from(v: i8) -> AtomicI8[src][]

Converts an i8 into an AtomicI8.

impl From<NonZeroU16> for u16[src][]

pub fn from(nonzero: NonZeroU16) -> u16[src][]

Converts a NonZeroU16 into an u16

impl From<NonZeroU64> for NonZeroI128[src][]

[]

Converts NonZeroU64 to NonZeroI128 losslessly.

impl From<f32> for f64[src][]

[]

Converts f32 to f64 losslessly.

impl From<u16> for u64[src][]

[]

Converts u16 to u64 losslessly.

impl From<NonZeroU128> for u128[src][]

pub fn from(nonzero: NonZeroU128) -> u128[src][]

Converts a NonZeroU128 into an u128

impl From<i32> for f64[src][]

[]

Converts i32 to f64 losslessly.

impl From<u64> for i128[src][]

[]

Converts u64 to i128 losslessly.

impl From<u8> for u16[src][]

[]

Converts u8 to u16 losslessly.

impl From<u8> for AtomicU8[src][]

pub fn from(v: u8) -> AtomicU8[src][]

Converts an u8 into an AtomicU8.

impl From<u16> for u128[src][]

[]

Converts u16 to u128 losslessly.

impl From<i8> for f64[src][]

[]

Converts i8 to f64 losslessly.

impl From<NonZeroU8> for NonZeroUsize[src][]

[]

Converts NonZeroU8 to NonZeroUsize losslessly.

impl From<u8> for i64[src][]

[]

Converts u8 to i64 losslessly.

impl<'_, T> From<&'_ T> for NonNull<T> where
    T: ?Sized
[src][]

impl From<u32> for u128[src][]

[]

Converts u32 to u128 losslessly.

impl From<bool> for u128[src][]

[]

Converts a bool to a u128. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(u128::from(true), 1);
assert_eq!(u128::from(false), 0);

impl From<u8> for i32[src][]

[]

Converts u8 to i32 losslessly.

impl From<u64> for u128[src][]

[]

Converts u64 to u128 losslessly.

impl From<i32> for i128[src][]

[]

Converts i32 to i128 losslessly.

impl From<u32> for i128[src][]

[]

Converts u32 to i128 losslessly.

impl From<bool> for u32[src][]

[]

Converts a bool to a u32. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(u32::from(true), 1);
assert_eq!(u32::from(false), 0);

impl From<bool> for u8[src][]

[]

Converts a bool to a u8. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(u8::from(true), 1);
assert_eq!(u8::from(false), 0);

impl From<i16> for i64[src][]

[]

Converts i16 to i64 losslessly.

impl From<NonZeroU8> for NonZeroI32[src][]

[]

Converts NonZeroU8 to NonZeroI32 losslessly.

impl From<u16> for u32[src][]

[]

Converts u16 to u32 losslessly.

impl From<NonZeroU8> for NonZeroU16[src][]

[]

Converts NonZeroU8 to NonZeroU16 losslessly.

impl From<bool> for i64[src][]

[]

Converts a bool to a i64. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(i64::from(true), 1);
assert_eq!(i64::from(false), 0);

impl<T> From<T> for UnsafeCell<T>[src][]

impl<T> From<*mut T> for AtomicPtr<T>[src][]

impl From<i16> for i32[src][]

[]

Converts i16 to i32 losslessly.

impl From<i32> for i64[src][]

[]

Converts i32 to i64 losslessly.

impl From<u8> for u64[src][]

[]

Converts u8 to u64 losslessly.

impl From<NonZeroI16> for NonZeroI128[src][]

[]

Converts NonZeroI16 to NonZeroI128 losslessly.

impl From<NonZeroU8> for u8[src][]

pub fn from(nonzero: NonZeroU8) -> u8[src][]

Converts a NonZeroU8 into an u8

impl From<bool> for i128[src][]

[]

Converts a bool to a i128. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(i128::from(true), 1);
assert_eq!(i128::from(false), 0);

impl From<NonZeroU16> for NonZeroI32[src][]

[]

Converts NonZeroU16 to NonZeroI32 losslessly.

impl From<i64> for AtomicI64[src][]

pub fn from(v: i64) -> AtomicI64[src][]

Converts an i64 into an AtomicI64.

impl From<bool> for isize[src][]

[]

Converts a bool to a isize. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(isize::from(true), 1);
assert_eq!(isize::from(false), 0);

impl From<NonZeroI64> for i64[src][]

pub fn from(nonzero: NonZeroI64) -> i64[src][]

Converts a NonZeroI64 into an i64

impl From<NonZeroU8> for NonZeroU128[src][]

[]

Converts NonZeroU8 to NonZeroU128 losslessly.

impl From<char> for u64[src][]

pub fn from(c: char) -> u64[src][]

Converts a [char] into a [u64].

Examples

use std::mem;

let c = '👤';
let u = u64::from(c);
assert!(8 == mem::size_of_val(&u))

impl From<u16> for usize[src][]

[]

Converts u16 to usize losslessly.

impl From<NonZeroI8> for i8[src][]

pub fn from(nonzero: NonZeroI8) -> i8[src][]

Converts a NonZeroI8 into an i8

impl From<u16> for AtomicU16[src][]

pub fn from(v: u16) -> AtomicU16[src][]

Converts an u16 into an AtomicU16.

impl From<u8> for i16[src][]

[]

Converts u8 to i16 losslessly.

impl From<i8> for i32[src][]

[]

Converts i8 to i32 losslessly.

impl From<usize> for AtomicUsize[src][]

pub fn from(v: usize) -> AtomicUsize[src][]

Converts an usize into an AtomicUsize.

impl From<NonZeroI16> for NonZeroI32[src][]

[]

Converts NonZeroI16 to NonZeroI32 losslessly.

impl From<char> for u128[src][]

pub fn from(c: char) -> u128[src][]

Converts a [char] into a [u128].

Examples

use std::mem;

let c = '⚙';
let u = u128::from(c);
assert!(16 == mem::size_of_val(&u))

impl From<u32> for f64[src][]

[]

Converts u32 to f64 losslessly.

impl From<NonZeroU64> for NonZeroU128[src][]

[]

Converts NonZeroU64 to NonZeroU128 losslessly.

impl From<NonZeroI16> for i16[src][]

pub fn from(nonzero: NonZeroI16) -> i16[src][]

Converts a NonZeroI16 into an i16

impl From<u32> for i64[src][]

[]

Converts u32 to i64 losslessly.

impl From<NonZeroU32> for NonZeroU128[src][]

[]

Converts NonZeroU32 to NonZeroU128 losslessly.

impl From<NonZeroU16> for NonZeroU64[src][]

[]

Converts NonZeroU16 to NonZeroU64 losslessly.

impl From<NonZeroI16> for NonZeroIsize[src][]

[]

Converts NonZeroI16 to NonZeroIsize losslessly.

impl From<NonZeroU8> for NonZeroU64[src][]

[]

Converts NonZeroU8 to NonZeroU64 losslessly.

impl From<Infallible> for TryFromIntError[src][]

impl From<char> for u32[src][]

pub fn from(c: char) -> u32[src][]

Converts a [char] into a [u32].

Examples

use std::mem;

let c = 'c';
let u = u32::from(c);
assert!(4 == mem::size_of_val(&u))

impl From<i8> for i16[src][]

[]

Converts i8 to i16 losslessly.

impl From<i8> for isize[src][]

[]

Converts i8 to isize losslessly.

impl From<i16> for i128[src][]

[]

Converts i16 to i128 losslessly.

impl<T> From<T> for OnceCell<T>[src][]

impl From<NonZeroUsize> for usize[src][]

pub fn from(nonzero: NonZeroUsize) -> usize[src][]

Converts a NonZeroUsize into an usize

impl From<u8> for i128[src][]

[]

Converts u8 to i128 losslessly.

impl From<u16> for f32[src][]

[]

Converts u16 to f32 losslessly.

impl<T> From<T> for Poll<T>[src][]

pub fn from(t: T) -> Poll<T>[src][]

Convert to a Ready variant.

Example

assert_eq!(Poll::from(true), Poll::Ready(true));

impl From<NonZeroI32> for i32[src][]

pub fn from(nonzero: NonZeroI32) -> i32[src][]

Converts a NonZeroI32 into an i32

impl From<bool> for usize[src][]

[]

Converts a bool to a usize. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(usize::from(true), 1);
assert_eq!(usize::from(false), 0);

impl From<u16> for f64[src][]

[]

Converts u16 to f64 losslessly.

impl From<u32> for AtomicU32[src][]

pub fn from(v: u32) -> AtomicU32[src][]

Converts an u32 into an AtomicU32.

impl From<u8> for f32[src][]

[]

Converts u8 to f32 losslessly.

impl From<i16> for isize[src][]

[]

Converts i16 to isize losslessly.

impl From<u8> for usize[src][]

[]

Converts u8 to usize losslessly.

impl From<NonZeroIsize> for isize[src][]

pub fn from(nonzero: NonZeroIsize) -> isize[src][]

Converts a NonZeroIsize into an isize

impl From<u16> for i64[src][]

[]

Converts u16 to i64 losslessly.

impl From<NonZeroU64> for u64[src][]

pub fn from(nonzero: NonZeroU64) -> u64[src][]

Converts a NonZeroU64 into an u64

impl From<NonZeroU8> for NonZeroU32[src][]

[]

Converts NonZeroU8 to NonZeroU32 losslessly.

impl From<NonZeroI128> for i128[src][]

pub fn from(nonzero: NonZeroI128) -> i128[src][]

Converts a NonZeroI128 into an i128

impl From<NonZeroU16> for NonZeroI64[src][]

[]

Converts NonZeroU16 to NonZeroI64 losslessly.

impl From<u8> for f64[src][]

[]

Converts u8 to f64 losslessly.

impl From<NonZeroU32> for NonZeroI128[src][]

[]

Converts NonZeroU32 to NonZeroI128 losslessly.

impl From<u64> for AtomicU64[src][]

pub fn from(v: u64) -> AtomicU64[src][]

Converts an u64 into an AtomicU64.

impl From<NonZeroI8> for NonZeroIsize[src][]

[]

Converts NonZeroI8 to NonZeroIsize losslessly.

impl From<isize> for AtomicIsize[src][]

pub fn from(v: isize) -> AtomicIsize[src][]

Converts an isize into an AtomicIsize.

impl<T> From<T> for RefCell<T>[src][]

impl From<NonZeroI16> for NonZeroI64[src][]

[]

Converts NonZeroI16 to NonZeroI64 losslessly.

impl From<bool> for i16[src][]

[]

Converts a bool to a i16. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(i16::from(true), 1);
assert_eq!(i16::from(false), 0);

impl From<u8> for char[src][]

[]

Maps a byte in 0x00..=0xFF to a char whose code point has the same value, in U+0000..=U+00FF.

Unicode is designed such that this effectively decodes bytes with the character encoding that IANA calls ISO-8859-1. This encoding is compatible with ASCII.

Note that this is different from ISO/IEC 8859-1 a.k.a. ISO 8859-1 (with one less hyphen), which leaves some “blanks”, byte values that are not assigned to any character. ISO-8859-1 (the IANA one) assigns them to the C0 and C1 control codes.

Note that this is also different from Windows-1252 a.k.a. code page 1252, which is a superset ISO/IEC 8859-1 that assigns some (not all!) blanks to punctuation and various Latin characters.

To confuse things further, on the Web ascii, iso-8859-1, and windows-1252 are all aliases for a superset of Windows-1252 that fills the remaining blanks with corresponding C0 and C1 control codes.

pub fn from(i: u8) -> char[src][]

Converts a u8 into a [char].

Examples

use std::mem;

let u = 32 as u8;
let c = char::from(u);
assert!(4 == mem::size_of_val(&c))

impl From<NonZeroI64> for NonZeroI128[src][]

[]

Converts NonZeroI64 to NonZeroI128 losslessly.

impl From<u8> for u32[src][]

[]

Converts u8 to u32 losslessly.

impl From<NonZeroU8> for NonZeroI16[src][]

[]

Converts NonZeroU8 to NonZeroI16 losslessly.

impl From<i8> for i128[src][]

[]

Converts i8 to i128 losslessly.

impl From<i16> for f32[src][]

[]

Converts i16 to f32 losslessly.

impl From<i8> for i64[src][]

[]

Converts i8 to i64 losslessly.

impl From<u16> for i32[src][]

[]

Converts u16 to i32 losslessly.

impl From<NonZeroI8> for NonZeroI128[src][]

[]

Converts NonZeroI8 to NonZeroI128 losslessly.

impl From<NonZeroU16> for NonZeroUsize[src][]

[]

Converts NonZeroU16 to NonZeroUsize losslessly.

impl From<i64> for i128[src][]

[]

Converts i64 to i128 losslessly.

impl From<NonZeroU32> for NonZeroI64[src][]

[]

Converts NonZeroU32 to NonZeroI64 losslessly.

impl From<NonZeroI32> for NonZeroI64[src][]

[]

Converts NonZeroI32 to NonZeroI64 losslessly.

impl From<u32> for u64[src][]

[]

Converts u32 to u64 losslessly.

impl From<i8> for f32[src][]

[]

Converts i8 to f32 losslessly.

impl From<NonZeroU8> for NonZeroI64[src][]

[]

Converts NonZeroU8 to NonZeroI64 losslessly.

impl<T> From<T> for Cell<T>[src][]

impl From<NonZeroU16> for NonZeroI128[src][]

[]

Converts NonZeroU16 to NonZeroI128 losslessly.

impl From<bool> for AtomicBool[src][]

pub fn from(b: bool) -> AtomicBool[src][]

Converts a bool into an AtomicBool.

Examples

use std::sync::atomic::AtomicBool;
let atomic_bool = AtomicBool::from(true);
assert_eq!(format!("{:?}", atomic_bool), "true")

impl From<NonZeroI32> for NonZeroI128[src][]

[]

Converts NonZeroI32 to NonZeroI128 losslessly.

impl From<NonZeroI8> for NonZeroI32[src][]

[]

Converts NonZeroI8 to NonZeroI32 losslessly.

impl From<u8> for isize[src][]

[]

Converts u8 to isize losslessly.

impl From<NonZeroU8> for NonZeroIsize[src][]

[]

Converts NonZeroU8 to NonZeroIsize losslessly.

impl From<bool> for u64[src][]

[]

Converts a bool to a u64. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(u64::from(true), 1);
assert_eq!(u64::from(false), 0);

impl From<NonZeroI8> for NonZeroI64[src][]

[]

Converts NonZeroI8 to NonZeroI64 losslessly.

impl From<NonZeroU16> for NonZeroU32[src][]

[]

Converts NonZeroU16 to NonZeroU32 losslessly.

impl From<bool> for i32[src][]

[]

Converts a bool to a i32. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(i32::from(true), 1);
assert_eq!(i32::from(false), 0);

impl From<bool> for u16[src][]

[]

Converts a bool to a u16. The resulting value is 0 for false and 1 for true values.

Examples

assert_eq!(u16::from(true), 1);
assert_eq!(u16::from(false), 0);

impl From<NonZeroU16> for NonZeroU128[src][]

[]

Converts NonZeroU16 to NonZeroU128 losslessly.

impl From<i16> for AtomicI16[src][]

pub fn from(v: i16) -> AtomicI16[src][]

Converts an i16 into an AtomicI16.

impl From<!> for TryFromIntError[src][]

impl From<u8> for u128[src][]

[]

Converts u8 to u128 losslessly.

impl From<u16> for i128[src][]

[]

Converts u16 to i128 losslessly.

impl From<NonZeroI8> for NonZeroI16[src][]

[]

Converts NonZeroI8 to NonZeroI16 losslessly.

impl<W> From<Arc<W>> for RawWaker where
    W: 'static + Wake + Send + Sync
[src][]

impl<T> From<T> for Rc<T>[src][]

impl From<String> for Arc<str>[src][]

pub fn from(v: String) -> Arc<str>[src][]

Allocate a reference-counted str and copy v into it.

Example

let unique: String = "eggplant".to_owned();
let shared: Arc<str> = Arc::from(unique);
assert_eq!("eggplant", &shared[..]);

impl<'_> From<&'_ str> for Arc<str>[src][]

pub fn from(v: &str) -> Arc<str>[src][]

Allocate a reference-counted str and copy v into it.

Example

let shared: Arc<str> = Arc::from("eggplant");
assert_eq!("eggplant", &shared[..]);

impl<'_, T> From<&'_ [T]> for Arc<[T]> where
    T: Clone
[src][]

pub fn from(v: &[T]) -> Arc<[T]>[src][]

Allocate a reference-counted slice and fill it by cloning v’s items.

Example

let original: &[i32] = &[1, 2, 3];
let shared: Arc<[i32]> = Arc::from(original);
assert_eq!(&[1, 2, 3], &shared[..]);

impl<T> From<Box<T, Global>> for Rc<T> where
    T: ?Sized
[src][]

pub fn from(v: Box<T, Global>) -> Rc<T>[src][]

Move a boxed object to a new, reference counted, allocation.

Example

let original: Box<i32> = Box::new(1);
let shared: Rc<i32> = Rc::from(original);
assert_eq!(1, *shared);

impl<'_> From<&'_ str> for Rc<str>[src][]

pub fn from(v: &str) -> Rc<str>[src][]

Allocate a reference-counted string slice and copy v into it.

Example

let shared: Rc<str> = Rc::from("statue");
assert_eq!("statue", &shared[..]);

impl<T, A> From<Box<T, A>> for Pin<Box<T, A>> where
    T: ?Sized,
    A: Allocator + 'static, 
[src][]

pub fn from(boxed: Box<T, A>) -> Pin<Box<T, A>>[src][]

Converts a Box<T> into a Pin<Box<T>>

This conversion does not allocate on the heap and happens in place.

impl<T> From<Box<T, Global>> for Arc<T> where
    T: ?Sized
[src][]

pub fn from(v: Box<T, Global>) -> Arc<T>[src][]

Move a boxed object to a new, reference-counted allocation.

Example

let unique: Box<str> = Box::from("eggplant");
let shared: Arc<str> = Arc::from(unique);
assert_eq!("eggplant", &shared[..]);

impl<'_, T> From<&'_ [T]> for Rc<[T]> where
    T: Clone
[src][]

pub fn from(v: &[T]) -> Rc<[T]>[src][]

Allocate a reference-counted slice and fill it by cloning v’s items.

Example

let original: &[i32] = &[1, 2, 3];
let shared: Rc<[i32]> = Rc::from(original);
assert_eq!(&[1, 2, 3], &shared[..]);

impl<'a, B> From<Cow<'a, B>> for Rc<B> where
    B: ToOwned + ?Sized,
    Rc<B>: From<&'a B>,
    Rc<B>: From<<B as ToOwned>::Owned>, 
[src][]

impl<T> From<T> for Arc<T>[src][]

impl<T> From<Vec<T, Global>> for Rc<[T]>[src][]

pub fn from(v: Vec<T, Global>) -> Rc<[T]>[src][]

Allocate a reference-counted slice and move v’s items into it.

Example

let original: Box<Vec<i32>> = Box::new(vec![1, 2, 3]);
let shared: Rc<Vec<i32>> = Rc::from(original);
assert_eq!(vec![1, 2, 3], *shared);

impl From<String> for Rc<str>[src][]

pub fn from(v: String) -> Rc<str>[src][]

Allocate a reference-counted string slice and copy v into it.

Example

let original: String = "statue".to_owned();
let shared: Rc<str> = Rc::from(original);
assert_eq!("statue", &shared[..]);

impl<T> From<Vec<T, Global>> for Arc<[T]>[src][]

pub fn from(v: Vec<T, Global>) -> Arc<[T]>[src][]

Allocate a reference-counted slice and move v’s items into it.

Example

let unique: Vec<i32> = vec![1, 2, 3];
let shared: Arc<[i32]> = Arc::from(unique);
assert_eq!(&[1, 2, 3], &shared[..]);

impl<'a, B> From<Cow<'a, B>> for Arc<B> where
    B: ToOwned + ?Sized,
    Arc<B>: From<&'a B>,
    Arc<B>: From<<B as ToOwned>::Owned>, 
[src][]

impl<W> From<Arc<W>> for Waker where
    W: 'static + Wake + Send + Sync
[src][]

Implementors

impl From<char> for String1.46.0[src][+]

impl From<!> for Infallible1.34.0[src][+]

impl From<LayoutError> for TryReserveError[src][+]

impl From<Box<str, Global>> for String1.18.0[src][+]

pub fn from(s: Box<str, Global>) -> String[src][]

Converts the given boxed str slice to a String. It is notable that the str slice is owned.

Examples

Basic usage:

let s1: String = String::from("hello world");
let s2: Box<str> = s1.into_boxed_str();
let s3: String = String::from(s2);

assert_eq!("hello world", s3)

impl From<String> for Box<str, Global>1.20.0[src][+]

pub fn from(s: String) -> Box<str, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts the given String to a boxed str slice that is owned.

Examples

Basic usage:

let s1: String = String::from("hello world");
let s2: Box<str> = Box::from(s1);
let s3: String = String::from(s2);

assert_eq!("hello world", s3)

impl From<String> for Box<dyn Error + 'static + Sync + Send, Global>[src][+]

pub fn from(err: String) -> Box<dyn Error + 'static + Sync + Send, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a String into a box of dyn Error + Send + Sync.

Examples

use std::error::Error;
use std::mem;

let a_string_error = "a string error".to_string();
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_string_error);
assert!(
    mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))

impl From<String> for Box<dyn Error + 'static, Global>1.6.0[src][+]

pub fn from(str_err: String) -> Box<dyn Error + 'static, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a String into a box of dyn Error.

Examples

use std::error::Error;
use std::mem;

let a_string_error = "a string error".to_string();
let a_boxed_error = Box::<dyn Error>::from(a_string_error);
assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))

impl From<String> for Vec<u8, Global>1.14.0[src][+]

pub fn from(string: String) -> Vec<u8, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src][]

Converts the given String to a vector Vec that holds values of type u8.

Examples

Basic usage:

let s1 = String::from("hello world");
let v1 = Vec::from(s1);

for b in v1 {
    println!("{}", b);
}

impl From<CString> for Box<CStr, Global>1.20.0[src][+]

pub fn from(s: CString) -> Box<CStr, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a CString into a Box<CStr> without copying or allocating.

impl From<CString> for Vec<u8, Global>1.7.0[src][+]

pub fn from(s: CString) -> Vec<u8, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src][]

Converts a CString into a Vec<u8>.

The conversion consumes the CString, and removes the terminating NUL byte.

impl From<OsString> for Box<OsStr, Global>1.20.0[src][+]

pub fn from(s: OsString) -> Box<OsStr, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a OsString into a Box<OsStr> without copying or allocating.

impl From<PathBuf> for Box<Path, Global>1.20.0[src][+]

pub fn from(p: PathBuf) -> Box<Path, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a PathBuf into a Box<Path>

This conversion currently should not allocate memory, but this behavior is not guaranteed on all platforms or in all future versions.

impl From<StreamResult> for Result<MZStatus, MZError>[+]

impl<'_> From<&'_ str> for Box<str, Global>1.17.0[src][+]

pub fn from(s: &str) -> Box<str, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a &str into a Box<str>

This conversion allocates on the heap and performs a copy of s.

Examples

let boxed: Box<str> = Box::from("hello");
println!("{}", boxed);

impl<'_> From<&'_ str> for Box<dyn Error + 'static, Global>1.6.0[src][+]

pub fn from(err: &str) -> Box<dyn Error + 'static, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a str into a box of dyn Error.

Examples

use std::error::Error;
use std::mem;

let a_str_error = "a str error";
let a_boxed_error = Box::<dyn Error>::from(a_str_error);
assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))

impl<'_> From<&'_ str> for String[src][+]

impl<'_> From<&'_ str> for Vec<u8, Global>[src][+]

pub fn from(s: &str) -> Vec<u8, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src][]

Allocate a Vec<u8> and fill it with a UTF-8 string.

Examples

assert_eq!(Vec::from("123"), vec![b'1', b'2', b'3']);

impl<'_> From<&'_ String> for String1.35.0[src][+]

impl<'_> From<&'_ CStr> for Box<CStr, Global>1.17.0[src][+]

impl<'_> From<&'_ OsStr> for Box<OsStr, Global>1.17.0[src][+]

impl<'_> From<&'_ Path> for Box<Path, Global>1.17.0[src][+]

impl<'_> From<&'_ StreamResult> for Result<MZStatus, MZError>[+]

impl<'_> From<&'_ mut str> for String1.44.0[src][+]

pub fn from(s: &mut str) -> String[src][]

Converts a &mut str into a String.

The result is allocated on the heap.

impl<'_> From<Cow<'_, str>> for Box<str, Global>1.45.0[src][+]

impl<'_> From<Cow<'_, CStr>> for Box<CStr, Global>1.45.0[src][+]

impl<'_> From<Cow<'_, OsStr>> for Box<OsStr, Global>1.45.0[src][+]

impl<'_> From<Cow<'_, Path>> for Box<Path, Global>1.45.0[src][+]

impl<'_, T> From<Cow<'_, [T]>> for Box<[T], Global> where
    T: Copy
1.45.0[src][+]

impl<'_, T> From<&'_ [T]> for Box<[T], Global> where
    T: Copy
1.17.0[src][+]

pub fn from(slice: &[T]) -> Box<[T], Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a &[T] into a Box<[T]>

This conversion allocates on the heap and performs a copy of slice.

Examples

// create a &[u8] which will be used to create a Box<[u8]>
let slice: &[u8] = &[104, 101, 108, 108, 111];
let boxed_slice: Box<[u8]> = Box::from(slice);

println!("{:?}", boxed_slice);

impl<'_, T> From<&'_ [T]> for Vec<T, Global> where
    T: Clone
[src][+]

pub fn from(s: &[T]) -> Vec<T, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src][]

Allocate a Vec<T> and fill it by cloning s’s items.

Examples

assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);

impl<'_, T> From<&'_ mut [T]> for Vec<T, Global> where
    T: Clone
1.19.0[src][+]

pub fn from(s: &mut [T]) -> Vec<T, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src][]

Allocate a Vec<T> and fill it by cloning s’s items.

Examples

assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);

impl<'a> From<&'a str> for Cow<'a, str>[src][+]

pub fn from(s: &'a str) -> Cow<'a, str>[src][]

Converts a string slice into a Borrowed variant. No heap allocation is performed, and the string is not copied.

Example

assert_eq!(Cow::from("eggplant"), Cow::Borrowed("eggplant"));

impl<'a> From<&'a String> for Cow<'a, str>1.28.0[src][+]

pub fn from(s: &'a String) -> Cow<'a, str>[src][]

Converts a String reference into a Borrowed variant. No heap allocation is performed, and the string is not copied.

Example

let s = "eggplant".to_string();
assert_eq!(Cow::from(&s), Cow::Borrowed("eggplant"));

impl<'a> From<&'a CStr> for Cow<'a, CStr>1.28.0[src][+]

impl<'a> From<&'a CString> for Cow<'a, CStr>1.28.0[src][+]

impl<'a> From<&'a OsStr> for Cow<'a, OsStr>1.28.0[src][+]

impl<'a> From<&'a OsString> for Cow<'a, OsStr>1.28.0[src][+]

impl<'a> From<&'a Path> for Cow<'a, Path>1.6.0[src][+]

impl<'a> From<&'a PathBuf> for Cow<'a, Path>1.28.0[src][+]

impl<'a> From<Cow<'a, str>> for Box<dyn Error + 'static, Global>1.22.0[src][+]

pub fn from(err: Cow<'a, str>) -> Box<dyn Error + 'static, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a Cow into a box of dyn Error.

Examples

use std::error::Error;
use std::mem;
use std::borrow::Cow;

let a_cow_str_error = Cow::from("a str error");
let a_boxed_error = Box::<dyn Error>::from(a_cow_str_error);
assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))

impl<'a> From<Cow<'a, str>> for String1.14.0[src][+]

impl<'a> From<String> for Cow<'a, str>[src][+]

pub fn from(s: String) -> Cow<'a, str>[src][]

Converts a String into an Owned variant. No heap allocation is performed, and the string is not copied.

Example

let s = "eggplant".to_string();
let s2 = "eggplant".to_string();
assert_eq!(Cow::from(s), Cow::<'static, str>::Owned(s2));

impl<'a> From<CString> for Cow<'a, CStr>1.28.0[src][+]

impl<'a> From<OsString> for Cow<'a, OsStr>1.28.0[src][+]

impl<'a> From<PathBuf> for Cow<'a, Path>1.6.0[src][+]

impl<'a, '_> From<&'_ str> for Box<dyn Error + 'a + Sync + Send, Global>[src][+]

pub fn from(err: &str) -> Box<dyn Error + 'a + Sync + Send, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a str into a box of dyn Error + Send + Sync.

Examples

use std::error::Error;
use std::mem;

let a_str_error = "a str error";
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_str_error);
assert!(
    mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))

impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + 'a + Sync + Send, Global>1.22.0[src][+]

pub fn from(err: Cow<'b, str>) -> Box<dyn Error + 'a + Sync + Send, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a Cow into a box of dyn Error + Send + Sync.

Examples

use std::error::Error;
use std::mem;
use std::borrow::Cow;

let a_cow_str_error = Cow::from("a str error");
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_cow_str_error);
assert!(
    mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))

impl<'a, E> From<E> for Box<dyn Error + 'a + Sync + Send, Global> where
    E: 'a + Error + Send + Sync
[src][+]

pub fn from(err: E) -> Box<dyn Error + 'a + Sync + Send, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a type of Error + Send + Sync into a box of dyn Error + Send + Sync.

Examples

use std::error::Error;
use std::fmt;
use std::mem;

#[derive(Debug)]
struct AnError;

impl fmt::Display for AnError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f , "An error")
    }
}

impl Error for AnError {}

unsafe impl Send for AnError {}

unsafe impl Sync for AnError {}

let an_error = AnError;
assert!(0 == mem::size_of_val(&an_error));
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(an_error);
assert!(
    mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))

impl<'a, E> From<E> for Box<dyn Error + 'a, Global> where
    E: 'a + Error
[src][+]

pub fn from(err: E) -> Box<dyn Error + 'a, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a type of Error into a box of dyn Error.

Examples

use std::error::Error;
use std::fmt;
use std::mem;

#[derive(Debug)]
struct AnError;

impl fmt::Display for AnError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f , "An error")
    }
}

impl Error for AnError {}

let an_error = AnError;
assert!(0 == mem::size_of_val(&an_error));
let a_boxed_error = Box::<dyn Error>::from(an_error);
assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))

impl<'a, T> From<&'a Option<T>> for Option<&'a T>1.30.0[src][+]

pub fn from(o: &'a Option<T>) -> Option<&'a T>[src][]

Converts from &Option<T> to Option<&T>.

Examples

Converts an Option<String> into an Option<usize>, preserving the original. The map method takes the self argument by value, consuming the original, so this technique uses as_ref to first take an Option to a reference to the value inside the original.

let s: Option<String> = Some(String::from("Hello, Rustaceans!"));
let o: Option<usize> = Option::from(&s).map(|ss: &String| ss.len());

println!("Can still print s: {:?}", s);

assert_eq!(o, Some(18));

impl<'a, T> From<&'a Vec<T, Global>> for Cow<'a, [T]> where
    T: Clone
1.28.0[src][+]

impl<'a, T> From<&'a mut Option<T>> for Option<&'a mut T>1.30.0[src][+]

pub fn from(o: &'a mut Option<T>) -> Option<&'a mut T>[src][]

Converts from &mut Option<T> to Option<&mut T>

Examples

let mut s = Some(String::from("Hello"));
let o: Option<&mut String> = Option::from(&mut s);

match o {
    Some(t) => *t = String::from("Hello, Rustaceans!"),
    None => (),
}

assert_eq!(s, Some(String::from("Hello, Rustaceans!")));

impl<'a, T> From<Cow<'a, [T]>> for Vec<T, Global> where
    [T]: ToOwned,
    <[T] as ToOwned>::Owned == Vec<T, Global>, 
1.14.0[src][+]

pub fn from(s: Cow<'a, [T]>) -> Vec<T, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src][]

Convert a clone-on-write slice into a vector.

If s already owns a Vec<T>, it will be returned directly. If s is borrowing a slice, a new Vec<T> will be allocated and filled by cloning s’s items into it.

Examples

let o: Cow<[i32]> = Cow::Owned(vec![1, 2, 3]);
let b: Cow<[i32]> = Cow::Borrowed(&[1, 2, 3]);
assert_eq!(Vec::from(o), Vec::from(b));

impl<'a, T> From<&'a [T]> for Cow<'a, [T]> where
    T: Clone
1.8.0[src][+]

impl<'a, T> From<Vec<T, Global>> for Cow<'a, [T]> where
    T: Clone
1.8.0[src][+]

impl<A> From<Box<str, A>> for Box<[u8], A> where
    A: Allocator
1.19.0[src][+]

pub fn from(s: Box<str, A>) -> Box<[u8], A>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a Box<str> into a Box<[u8]>

This conversion does not allocate on the heap and happens in place.

Examples

// create a Box<str> which will be used to create a Box<[u8]>
let boxed: Box<str> = Box::from("hello");
let boxed_str: Box<[u8]> = Box::from(boxed);

// create a &[u8] which will be used to create a Box<[u8]>
let slice: &[u8] = &[104, 101, 108, 108, 111];
let boxed_slice = Box::from(slice);

assert_eq!(boxed_slice, boxed_str);

impl<T> From<!> for T1.34.0[src][+]

Stability note: This impl does not yet exist, but we are “reserving space” to add it in the future. See rust-lang/rust#64715 for details.

impl<T> From<BinaryHeap<T>> for Vec<T, Global>1.5.0[src][+]

pub fn from(heap: BinaryHeap<T>) -> Vec<T, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src][]

Converts a BinaryHeap<T> into a Vec<T>.

This conversion requires no data movement or allocation, and has constant time complexity.

impl<T> From<VecDeque<T>> for Vec<T, Global>1.10.0[src][+]

pub fn from(other: VecDeque<T>) -> Vec<T, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src][]

Turn a VecDeque<T> into a Vec<T>.

This never needs to re-allocate, but does need to do O(n) data movement if the circular buffer doesn’t happen to be at the beginning of the allocation.

Examples

use std::collections::VecDeque;

// This one is *O*(1).
let deque: VecDeque<_> = (1..5).collect();
let ptr = deque.as_slices().0.as_ptr();
let vec = Vec::from(deque);
assert_eq!(vec, [1, 2, 3, 4]);
assert_eq!(vec.as_ptr(), ptr);

// This one needs data rearranging.
let mut deque: VecDeque<_> = (1..5).collect();
deque.push_front(9);
deque.push_front(8);
let ptr = deque.as_slices().1.as_ptr();
let vec = Vec::from(deque);
assert_eq!(vec, [8, 9, 1, 2, 3, 4]);
assert_eq!(vec.as_ptr(), ptr);

impl<T> From<Vec<T, Global>> for BinaryHeap<T> where
    T: Ord
1.5.0[src][+]

pub fn from(vec: Vec<T, Global>) -> BinaryHeap<T>[src][]

Converts a Vec<T> into a BinaryHeap<T>.

This conversion happens in-place, and has O(n) time complexity.

impl<T> From<Vec<T, Global>> for VecDeque<T>1.10.0[src][+]

pub fn from(other: Vec<T, Global>) -> VecDeque<T>[src][]

Turn a Vec<T> into a VecDeque<T>.

This avoids reallocating where possible, but the conditions for that are strict, and subject to change, and so shouldn’t be relied upon unless the Vec<T> came from From<VecDeque<T>> and hasn’t been reallocated.

impl<T> From<T> for Option<T>1.12.0[src][+]

pub fn from(val: T) -> Option<T>[src][]

Copies val into a new Some.

Examples

let o: Option<u8> = Option::from(67);

assert_eq!(Some(67), o);

impl<T> From<T> for Box<T, Global>1.6.0[src][+]

pub fn from(t: T) -> Box<T, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a generic type T into a Box<T>

The conversion allocates on the heap and moves t from the stack into it.

Examples

let x = 5;
let boxed = Box::new(5);

assert_eq!(Box::from(x), boxed);

impl<T> From<T> for T[src][+]

impl<T, A> From<Box<[T], A>> for Vec<T, A> where
    A: Allocator
1.18.0[src][+]

pub fn from(s: Box<[T], A>) -> Vec<T, A>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src][]

Convert a boxed slice into a vector by transferring ownership of the existing heap allocation.

Examples

let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();
assert_eq!(Vec::from(b), vec![1, 2, 3]);

impl<T, A> From<Vec<T, A>> for Box<[T], A> where
    A: Allocator
1.20.0[src][+]

pub fn from(v: Vec<T, A>) -> Box<[T], A>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Convert a vector into a boxed slice.

If v has excess capacity, its items will be moved into a newly-allocated buffer with exactly the right capacity.

Examples

assert_eq!(Box::from(vec![1, 2, 3]), vec![1, 2, 3].into_boxed_slice());

impl<T, const N: usize> From<[T; N]> for Box<[T], Global>1.45.0[src][+]

pub fn from(array: [T; N]) -> Box<[T], Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
[src][]

Converts a [T; N] into a Box<[T]>

This conversion moves the array to newly heap-allocated memory.

Examples

let boxed: Box<[u8]> = Box::from([4, 2]);
println!("{:?}", boxed);

impl<T, const N: usize> From<[T; N]> for Vec<T, Global>1.44.0[src][+]

impl From<Colour> for Style

impl<'a, I, S: 'a + ToOwned + ?Sized> From<I> for ANSIGenericString<'a, S> where
    I: Into<Cow<'a, S>>,
    <S as ToOwned>::Owned: Debug

impl<E> From<E> for Error where
    E: StdError + Send + Sync + 'static, 

impl From<Error> for Box<dyn StdError + Send + Sync + 'static>

impl From<Error> for Box<dyn StdError + 'static>

impl<A, T, S> From<A> for Cache<A, T> where
    A: Deref<Target = ArcSwapAny<T, S>>,
    T: RefCnt,
    S: LockStorage

impl<T: RefCnt, S: LockStorage> From<T> for ArcSwapAny<T, S>

impl<A: Array> From<A> for ArrayVec<A>

impl From<Vec<BacktraceFrame, Global>> for Backtrace

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<String> for Error

impl<'a> From<&'a [u8]> for BString

impl From<Vec<u8, Global>> for BString

impl From<BString> for Vec<u8>

impl<'a> From<&'a str> for BString

impl From<String> for BString

impl<'a> From<&'a BStr> for BString

impl<'a> From<&'a [u8]> for &'a BStr

impl<'a> From<&'a str> for &'a BStr

impl From<&'static [u8]> for Bytes

impl From<&'static str> for Bytes

impl From<Vec<u8, Global>> for Bytes

impl From<String> for Bytes

impl<'a> From<&'a [u8]> for BytesMut

impl<'a> From<&'a str> for BytesMut

impl From<BytesMut> for Bytes

impl From<Error> for Error

impl From<Utf8Error> for Error

impl From<FromUtf8Error> for Error

impl From<Error> for Error

impl From<SendError> for SendError

impl From<TrySendError<(CdcEvent, usize)>> for SendError

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<SendError> for Error

impl From<String> for Error

impl From<Error> for Error

impl From<DateTime<Utc>> for DateTime<FixedOffset>

impl From<DateTime<Utc>> for DateTime<Local>

impl From<DateTime<FixedOffset>> for DateTime<Utc>

impl From<DateTime<FixedOffset>> for DateTime<Local>

impl From<DateTime<Local>> for DateTime<Utc>

impl From<DateTime<Local>> for DateTime<FixedOffset>

impl From<SystemTime> for DateTime<Utc>

impl From<SystemTime> for DateTime<Local>

impl<'a, 'b, 'z> From<&'z Arg<'a, 'b>> for Arg<'a, 'b>

impl<'a, 'z> From<&'z ArgGroup<'a>> for ArgGroup<'a>

impl From<Error> for Error

impl From<Error> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Error> for Error

impl From<ProtobufError> for Error

impl From<Error> for ErrorInner

impl From<Box<ErrorInner, Global>> for Error

impl From<ErrorInner> for Error

impl<T: Into<ErrorInner>> From<T> for Error

impl From<u64> for ConfigValue

impl From<f64> for ConfigValue

impl From<i32> for ConfigValue

impl From<u32> for ConfigValue

impl From<usize> for ConfigValue

impl From<bool> for ConfigValue

impl From<String> for ConfigValue

impl From<HashMap<String, ConfigValue, RandomState>> for ConfigValue

impl From<ConfigValue> for ConfigChange

impl<T> From<SendError<T>> for TrySendError<T>

impl<T> From<SendError<T>> for SendTimeoutError<T>

impl From<RecvError> for TryRecvError

impl From<RecvError> for RecvTimeoutError

impl<T: ?Sized + Pointable> From<Owned<T>> for Atomic<T>

impl<T> From<Box<T, Global>> for Atomic<T>

impl<T> From<T> for Atomic<T>

impl<'g, T: ?Sized + Pointable> From<Shared<'g, T>> for Atomic<T>

impl<T> From<*const T> for Atomic<T>

impl<T> From<T> for Owned<T>

impl<T> From<Box<T, Global>> for Owned<T>

impl<T> From<*const T> for Shared<'_, T>

impl<T> From<T> for AtomicCell<T>

impl<T> From<T> for CachePadded<T>

impl<T> From<T> for ShardedLock<T>

impl<T> From<Style> for Fields<T>

impl<T, U: Into<Vec<T>>> From<(Style, U)> for Fields<T>

impl From<Fields> for Style

impl<'a> From<&'a Fields> for Style

impl From<Purpose> for Options

impl From<Ident> for IdentString

impl<T> From<Option<T>> for Override<T>

impl From<Vec<Path, Global>> for PathList

impl<T: Spanned> From<T> for SpannedValue<T>

impl From<bool> for Flag

impl From<Option<()>> for Flag

impl From<Uuid> for DebugId

impl From<(Uuid, u32)> for DebugId

impl From<String> for CodeId

impl From<&'_ str> for CodeId

impl<L, R> From<Result<R, L>> for Either<L, R>

impl<'a> From<&'a [u8]> for AesGcmTag

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Error> for Error

impl From<ErrorStack> for Error

impl From<ProtobufError> for Error

impl From<String> for Error

impl From<CloudConvertError> for Error

impl<'a> From<SeekKey<'a>> for RocksSeekKey<'a>

impl From<ReadOptions> for RocksReadOptions

impl From<&'_ ReadOptions> for RocksReadOptions

impl From<WriteOptions> for RocksWriteOptions

impl From<&'_ WriteOptions> for RocksWriteOptions

impl From<IterOptions> for RocksReadOptions

impl From<SizeProperties> for RangeProperties

impl From<LogLevel> for DBInfoLogLevel

impl From<CompressionType> for DBCompressionType

impl From<ConfigValue> for BlobRunMode

impl From<BlobRunMode> for DBTitanDBBlobRunMode

impl<'a> From<&'a [u8]> for SeekKey<'a>

impl From<ProtobufError> for Error

impl From<Error> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Error> for Error

impl From<String> for Error

impl<D> From<D> for Context<D> where
    D: Display + Send + Sync + 'static, 

impl<F: Fail> From<F> for Error

impl From<SystemTime> for FileTime

impl<'a, T> From<FutureObj<'a, T>> for LocalFutureObj<'a, T>

impl<'a, F: Future<Output = ()> + Send + 'a> From<Box<F, Global>> for FutureObj<'a, ()>

impl<'a> From<Box<dyn Future<Output = ()> + 'a + Send, Global>> for FutureObj<'a, ()>

impl<'a, F: Future<Output = ()> + Send + 'a> From<Pin<Box<F, Global>>> for FutureObj<'a, ()>

impl<'a> From<Pin<Box<dyn Future<Output = ()> + 'a + Send, Global>>> for FutureObj<'a, ()>

impl<'a, F: Future<Output = ()> + 'a> From<Box<F, Global>> for LocalFutureObj<'a, ()>

impl<'a> From<Box<dyn Future<Output = ()> + 'a, Global>> for LocalFutureObj<'a, ()>

impl<'a, F: Future<Output = ()> + 'a> From<Pin<Box<F, Global>>> for LocalFutureObj<'a, ()>

impl<'a> From<Pin<Box<dyn Future<Output = ()> + 'a, Global>>> for LocalFutureObj<'a, ()>

impl<T> From<Option<T>> for OptionFuture<T>

impl<T> From<T> for Mutex<T>

impl From<InvalidUri> for RequestError

impl<T> From<[T; 1]> for GenericArray<T, U1>

impl<'a, T> From<&'a [T; 1]> for &'a GenericArray<T, U1>

impl<'a, T> From<&'a mut [T; 1]> for &'a mut GenericArray<T, U1>

impl<T> From<[T; 2]> for GenericArray<T, U2>

impl<'a, T> From<&'a [T; 2]> for &'a GenericArray<T, U2>

impl<'a, T> From<&'a mut [T; 2]> for &'a mut GenericArray<T, U2>

impl<T> From<[T; 3]> for GenericArray<T, U3>

impl<'a, T> From<&'a [T; 3]> for &'a GenericArray<T, U3>

impl<'a, T> From<&'a mut [T; 3]> for &'a mut GenericArray<T, U3>

impl<T> From<[T; 4]> for GenericArray<T, U4>

impl<'a, T> From<&'a [T; 4]> for &'a GenericArray<T, U4>

impl<'a, T> From<&'a mut [T; 4]> for &'a mut GenericArray<T, U4>

impl<T> From<[T; 5]> for GenericArray<T, U5>

impl<'a, T> From<&'a [T; 5]> for &'a GenericArray<T, U5>

impl<'a, T> From<&'a mut [T; 5]> for &'a mut GenericArray<T, U5>

impl<T> From<[T; 6]> for GenericArray<T, U6>

impl<'a, T> From<&'a [T; 6]> for &'a GenericArray<T, U6>

impl<'a, T> From<&'a mut [T; 6]> for &'a mut GenericArray<T, U6>

impl<T> From<[T; 7]> for GenericArray<T, U7>

impl<'a, T> From<&'a [T; 7]> for &'a GenericArray<T, U7>

impl<'a, T> From<&'a mut [T; 7]> for &'a mut GenericArray<T, U7>

impl<T> From<[T; 8]> for GenericArray<T, U8>

impl<'a, T> From<&'a [T; 8]> for &'a GenericArray<T, U8>

impl<'a, T> From<&'a mut [T; 8]> for &'a mut GenericArray<T, U8>

impl<T> From<[T; 9]> for GenericArray<T, U9>

impl<'a, T> From<&'a [T; 9]> for &'a GenericArray<T, U9>

impl<'a, T> From<&'a mut [T; 9]> for &'a mut GenericArray<T, U9>

impl<T> From<[T; 10]> for GenericArray<T, U10>

impl<'a, T> From<&'a [T; 10]> for &'a GenericArray<T, U10>

impl<'a, T> From<&'a mut [T; 10]> for &'a mut GenericArray<T, U10>

impl<T> From<[T; 11]> for GenericArray<T, U11>

impl<'a, T> From<&'a [T; 11]> for &'a GenericArray<T, U11>

impl<'a, T> From<&'a mut [T; 11]> for &'a mut GenericArray<T, U11>

impl<T> From<[T; 12]> for GenericArray<T, U12>

impl<'a, T> From<&'a [T; 12]> for &'a GenericArray<T, U12>

impl<'a, T> From<&'a mut [T; 12]> for &'a mut GenericArray<T, U12>

impl<T> From<[T; 13]> for GenericArray<T, U13>

impl<'a, T> From<&'a [T; 13]> for &'a GenericArray<T, U13>

impl<'a, T> From<&'a mut [T; 13]> for &'a mut GenericArray<T, U13>

impl<T> From<[T; 14]> for GenericArray<T, U14>

impl<'a, T> From<&'a [T; 14]> for &'a GenericArray<T, U14>

impl<'a, T> From<&'a mut [T; 14]> for &'a mut GenericArray<T, U14>

impl<T> From<[T; 15]> for GenericArray<T, U15>

impl<'a, T> From<&'a [T; 15]> for &'a GenericArray<T, U15>

impl<'a, T> From<&'a mut [T; 15]> for &'a mut GenericArray<T, U15>

impl<T> From<[T; 16]> for GenericArray<T, U16>

impl<'a, T> From<&'a [T; 16]> for &'a GenericArray<T, U16>

impl<'a, T> From<&'a mut [T; 16]> for &'a mut GenericArray<T, U16>

impl<T> From<[T; 17]> for GenericArray<T, U17>

impl<'a, T> From<&'a [T; 17]> for &'a GenericArray<T, U17>

impl<'a, T> From<&'a mut [T; 17]> for &'a mut GenericArray<T, U17>

impl<T> From<[T; 18]> for GenericArray<T, U18>

impl<'a, T> From<&'a [T; 18]> for &'a GenericArray<T, U18>

impl<'a, T> From<&'a mut [T; 18]> for &'a mut GenericArray<T, U18>

impl<T> From<[T; 19]> for GenericArray<T, U19>

impl<'a, T> From<&'a [T; 19]> for &'a GenericArray<T, U19>

impl<'a, T> From<&'a mut [T; 19]> for &'a mut GenericArray<T, U19>

impl<T> From<[T; 20]> for GenericArray<T, U20>

impl<'a, T> From<&'a [T; 20]> for &'a GenericArray<T, U20>

impl<'a, T> From<&'a mut [T; 20]> for &'a mut GenericArray<T, U20>

impl<T> From<[T; 21]> for GenericArray<T, U21>

impl<'a, T> From<&'a [T; 21]> for &'a GenericArray<T, U21>

impl<'a, T> From<&'a mut [T; 21]> for &'a mut GenericArray<T, U21>

impl<T> From<[T; 22]> for GenericArray<T, U22>

impl<'a, T> From<&'a [T; 22]> for &'a GenericArray<T, U22>

impl<'a, T> From<&'a mut [T; 22]> for &'a mut GenericArray<T, U22>

impl<T> From<[T; 23]> for GenericArray<T, U23>

impl<'a, T> From<&'a [T; 23]> for &'a GenericArray<T, U23>

impl<'a, T> From<&'a mut [T; 23]> for &'a mut GenericArray<T, U23>

impl<T> From<[T; 24]> for GenericArray<T, U24>

impl<'a, T> From<&'a [T; 24]> for &'a GenericArray<T, U24>

impl<'a, T> From<&'a mut [T; 24]> for &'a mut GenericArray<T, U24>

impl<T> From<[T; 25]> for GenericArray<T, U25>

impl<'a, T> From<&'a [T; 25]> for &'a GenericArray<T, U25>

impl<'a, T> From<&'a mut [T; 25]> for &'a mut GenericArray<T, U25>

impl<T> From<[T; 26]> for GenericArray<T, U26>

impl<'a, T> From<&'a [T; 26]> for &'a GenericArray<T, U26>

impl<'a, T> From<&'a mut [T; 26]> for &'a mut GenericArray<T, U26>

impl<T> From<[T; 27]> for GenericArray<T, U27>

impl<'a, T> From<&'a [T; 27]> for &'a GenericArray<T, U27>

impl<'a, T> From<&'a mut [T; 27]> for &'a mut GenericArray<T, U27>

impl<T> From<[T; 28]> for GenericArray<T, U28>

impl<'a, T> From<&'a [T; 28]> for &'a GenericArray<T, U28>

impl<'a, T> From<&'a mut [T; 28]> for &'a mut GenericArray<T, U28>

impl<T> From<[T; 29]> for GenericArray<T, U29>

impl<'a, T> From<&'a [T; 29]> for &'a GenericArray<T, U29>

impl<'a, T> From<&'a mut [T; 29]> for &'a mut GenericArray<T, U29>

impl<T> From<[T; 30]> for GenericArray<T, U30>

impl<'a, T> From<&'a [T; 30]> for &'a GenericArray<T, U30>

impl<'a, T> From<&'a mut [T; 30]> for &'a mut GenericArray<T, U30>

impl<T> From<[T; 31]> for GenericArray<T, U31>

impl<'a, T> From<&'a [T; 31]> for &'a GenericArray<T, U31>

impl<'a, T> From<&'a mut [T; 31]> for &'a mut GenericArray<T, U31>

impl<T> From<[T; 32]> for GenericArray<T, U32>

impl<'a, T> From<&'a [T; 32]> for &'a GenericArray<T, U32>

impl<'a, T> From<&'a mut [T; 32]> for &'a mut GenericArray<T, U32>

impl<'a, T, N: ArrayLength<T>> From<&'a [T]> for &'a GenericArray<T, N>

impl<'a, T, N: ArrayLength<T>> From<&'a mut [T]> for &'a mut GenericArray<T, N>

impl From<NonZeroU32> for Error

impl From<Vec<u8, Global>> for GrpcSlice

impl From<String> for GrpcSlice

impl From<CString> for GrpcSlice

impl From<&'_ [u8]> for GrpcSlice

impl From<&'_ str> for GrpcSlice

impl From<&'_ CStr> for GrpcSlice

impl From<Duration> for Deadline

impl From<i32> for RpcStatusCode

impl From<ProtobufError> for Error

impl From<Duration> for gpr_timespec

impl From<Reason> for Error

impl From<u32> for Reason

impl<'a> From<&'a HeaderName> for HeaderName

impl From<HeaderName> for HeaderValue

impl From<u16> for HeaderValue

impl From<i16> for HeaderValue

impl From<u32> for HeaderValue

impl From<i32> for HeaderValue

impl From<u64> for HeaderValue

impl From<i64> for HeaderValue

impl From<usize> for HeaderValue

impl From<isize> for HeaderValue

impl<'a> From<&'a HeaderValue> for HeaderValue

impl<'a> From<&'a Method> for Method

impl<'a> From<&'a StatusCode> for StatusCode

impl From<Uri> for Parts

impl From<InvalidStatusCode> for Error

impl From<InvalidMethod> for Error

impl From<InvalidUri> for Error

impl From<InvalidUriParts> for Error

impl From<InvalidHeaderName> for Error

impl From<InvalidHeaderValue> for Error

impl From<Infallible> for Error

impl From<SystemTime> for HttpDate

impl From<ParseIntError> for Error

impl From<Box<dyn Stream<Item = Result<Bytes, Box<dyn Error + 'static + Sync + Send, Global>>> + 'static + Send, Global>> for Body

impl From<Bytes> for Body

impl From<Vec<u8, Global>> for Body

impl From<&'static [u8]> for Body

impl From<Cow<'static, [u8]>> for Body

impl From<String> for Body

impl From<&'static str> for Body

impl From<Cow<'static, str>> for Body

impl<T> From<(T, TlsConnector)> for HttpsConnector<T>

impl<T> From<T> for MaybeHttpsStream<T>

impl<T> From<TlsStream<T>> for MaybeHttpsStream<T>

impl From<Options> for Folder

impl From<Options> for Folder

impl From<Options> for Folder

impl From<Options> for Folder

impl From<Options> for Folder

impl From<Ipv4AddrRange> for IpAddrRange

impl From<Ipv6AddrRange> for IpAddrRange

impl From<Ipv4Net> for IpNet

impl From<Ipv6Net> for IpNet

impl From<IpAddr> for IpNet

impl From<Ipv4Addr> for Ipv4Net

impl From<Ipv6Addr> for Ipv6Net

impl From<Ipv4Subnets> for IpSubnets

impl From<Ipv6Subnets> for IpSubnets

impl From<Ipv4Addr> for Ipv4Network

impl From<Ipv6Addr> for Ipv6Network

impl From<Ipv4Network> for IpNetwork

impl From<Ipv6Network> for IpNetwork

impl From<IpAddr> for IpNetwork

impl<A: IntoIterator> From<(A,)> for Zip<(A::IntoIter,)>

impl<A: IntoIterator, B: IntoIterator> From<(A, B)> for Zip<(A::IntoIter, B::IntoIter)>

impl<A: IntoIterator, B: IntoIterator, C: IntoIterator> From<(A, B, C)> for Zip<(A::IntoIter, B::IntoIter, C::IntoIter)>

impl<A: IntoIterator, B: IntoIterator, C: IntoIterator, D: IntoIterator> From<(A, B, C, D)> for Zip<(A::IntoIter, B::IntoIter, C::IntoIter, D::IntoIter)>

impl<A: IntoIterator, B: IntoIterator, C: IntoIterator, D: IntoIterator, E: IntoIterator> From<(A, B, C, D, E)> for Zip<(A::IntoIter, B::IntoIter, C::IntoIter, D::IntoIter, E::IntoIter)>

impl<A: IntoIterator, B: IntoIterator, C: IntoIterator, D: IntoIterator, E: IntoIterator, F: IntoIterator> From<(A, B, C, D, E, F)> for Zip<(A::IntoIter, B::IntoIter, C::IntoIter, D::IntoIter, E::IntoIter, F::IntoIter)>

impl<A: IntoIterator, B: IntoIterator, C: IntoIterator, D: IntoIterator, E: IntoIterator, F: IntoIterator, G: IntoIterator> From<(A, B, C, D, E, F, G)> for Zip<(A::IntoIter, B::IntoIter, C::IntoIter, D::IntoIter, E::IntoIter, F::IntoIter, G::IntoIter)>

impl<A: IntoIterator, B: IntoIterator, C: IntoIterator, D: IntoIterator, E: IntoIterator, F: IntoIterator, G: IntoIterator, H: IntoIterator> From<(A, B, C, D, E, F, G, H)> for Zip<(A::IntoIter, B::IntoIter, C::IntoIter, D::IntoIter, E::IntoIter, F::IntoIter, G::IntoIter, H::IntoIter)>

impl From<CompressionLevel> for CompressionLevel

impl From<CompressionLevel> for CompressionLevel

impl From<Library> for Library

impl From<Library> for Library

impl<R: RawMutex, T> From<T> for Mutex<R, T>

impl<R: RawMutex, G: GetThreadId, T> From<T> for ReentrantMutex<R, G, T>

impl<R: RawRwLock, T> From<T> for RwLock<R, T>

impl From<Digest> for [u8; 16]

impl From<Context> for Digest

impl From<Ready> for UnixReady

impl From<UnixReady> for Ready

impl From<usize> for Token

impl<T> From<SendError<T>> for SendError<T>

impl<T> From<Error> for SendError<T>

impl<T> From<TrySendError<T>> for TrySendError<T>

impl<T> From<SendError<T>> for TrySendError<T>

impl<T> From<Error> for TrySendError<T>

impl<'a> From<Vec<AioCb<'a>, Global>> for LioCb<'a>

impl<'a> From<&'a sigevent> for SigEvent

impl From<ucred> for UnixCredentials

impl From<termios> for Termios

impl From<timespec> for TimeSpec

impl From<Duration> for TimeSpec

impl From<timeval> for TimeVal

impl From<i32> for ClockId

impl From<Pid> for pid_t

impl From<&'_ passwd> for User

impl From<&'_ group> for Group

impl From<Errno> for Error

impl From<FromUtf8Error> for Error

impl From<Error> for Error

impl<T: Clone + Num> From<T> for Complex<T>

impl<'a, T: Clone + Num> From<&'a T> for Complex<T>

impl From<Locale> for CustomFormat

impl From<CustomFormat> for CustomFormatBuilder

impl From<Locale> for CustomFormatBuilder

impl From<ErrorKind> for Error

impl<T> From<T> for Ratio<T> where
    T: Clone + Integer

impl<T> From<(T, T)> for Ratio<T> where
    T: Clone + Integer

impl<T> From<T> for OnceCell<T>

impl<T> From<T> for OnceCell<T>

impl From<ErrorStack> for Error

impl<S> From<ErrorStack> for HandshakeError<S>

impl<T: Float> From<T> for OrderedFloat<T>

impl<T: Float> From<T> for NotNan<T>

impl From<Error> for Error

impl From<Error> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<[u8; 6]> for MacAddr

impl<'a> From<&'a Config> for Config

impl<'a> From<&'a Config> for Config

impl From<Error> for Error

impl From<Error> for Error

impl From<&'_ Symbol> for Symbol

impl From<Span> for Span

impl From<TokenStream> for TokenStream

impl From<TokenTree> for TokenStream

impl From<Group> for TokenTree

impl From<Ident> for TokenTree

impl From<Punct> for TokenTree

impl From<Literal> for TokenTree

impl From<Error> for Diagnostic

impl From<Error> for ProcError

impl From<&'static str> for ProcError

impl From<ParseIntError> for ProcError

impl From<Error> for Error

impl From<ProtobufError> for Error

impl From<Opts> for HistogramOpts

impl From<Error> for ProtobufError

impl From<Utf8Error> for ProtobufError

impl<T> From<Vec<T, Global>> for RepeatedField<T>

impl<'a, T: Clone> From<&'a [T]> for RepeatedField<T>

impl<T: Default> From<Option<T>> for SingularField<T>

impl<T> From<Option<T>> for SingularPtrField<T>

impl<'a> From<&'a str> for Chars

impl From<String> for Chars

impl From<Error> for Error

impl From<Utf8Error> for Error

impl<'a> From<(&'a [u8], &'a [u8])> for Attribute<'a>

impl<'a> From<(&'a str, &'a str)> for Attribute<'a>

impl From<Error> for Error

impl From<StorageError> for Error

impl From<ProtobufError> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for StorageError

impl From<Error> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<ProtobufError> for Error

impl<Iter1, Iter2> From<(Iter1, Iter2)> for ConfState where
    Iter1: IntoIterator<Item = u64>,
    Iter2: IntoIterator<Item = u64>, 

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<ProtobufError> for Error

impl From<Error> for Error

impl From<AddrParseError> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl<T> From<TrySendError<T>> for Error

impl From<DeadlineError> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Error> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl<X: SampleUniform> From<Range<X>> for Uniform<X>

impl<X: SampleUniform> From<RangeInclusive<X>> for Uniform<X>

impl From<Vec<u32, Global>> for IndexVec

impl From<Vec<usize, Global>> for IndexVec

impl From<ChaCha20Core> for ChaCha20Rng

impl From<ChaCha12Core> for ChaCha12Rng

impl From<ChaCha8Core> for ChaCha8Rng

impl From<NonZeroU32> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Bytes> for Body

impl From<Vec<u8, Global>> for Body

impl From<&'static [u8]> for Body

impl From<String> for Body

impl From<&'static str> for Body

impl<T: Into<Body>> From<Response<T>> for Response

impl From<Response> for Body

impl From<Vec<u8, Global>> for Body

impl From<String> for Body

impl From<&'static [u8]> for Body

impl From<&'static str> for Body

impl From<File> for Body

impl From<ClientBuilder> for ClientBuilder

impl<T: Into<Body>> From<Response<T>> for Response

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl<T: Copy> From<[T; 3]> for RGB<T>

impl<T: Copy> From<[T; 4]> for RGBA<T>

impl<T: Copy> From<[T; 3]> for BGR<T>

impl<T: Copy> From<[T; 4]> for BGRA<T>

impl<T> From<(T, T, T)> for RGB<T>

impl<T, A> From<(T, T, T, A)> for RGBA<T, A>

impl<T> From<(T, T, T)> for BGR<T>

impl<T, A> From<(T, T, T, A)> for BGRA<T, A>

impl From<RGB<u8>> for RGB<i16>

impl From<RGB<u16>> for RGB<i32>

impl From<RGB<u8>> for RGB<f32>

impl From<RGB<u8>> for RGB<f64>

impl From<RGB<u16>> for RGB<f32>

impl From<RGB<u16>> for RGB<f64>

impl From<RGB<i16>> for RGB<f32>

impl From<RGB<i16>> for RGB<f64>

impl From<RGB<i32>> for RGB<f64>

impl From<RGB<f32>> for RGB<f64>

impl From<RGBA<u16, u16>> for RGBA<i32>

impl From<RGBA<u8, u8>> for RGBA<f32>

impl From<RGBA<u8, u8>> for RGBA<f64>

impl From<RGBA<u16, u16>> for RGBA<f32>

impl From<RGBA<u16, u16>> for RGBA<f64>

impl From<RGBA<i16, i16>> for RGBA<f32>

impl From<RGBA<i16, i16>> for RGBA<f64>

impl From<RGBA<i32, i32>> for RGBA<f64>

impl From<RGBA<f32, f32>> for RGBA<f64>

impl<T: Clone> From<Gray<T>> for RGB<T>

impl<T: Clone, A> From<GrayAlpha<T, A>> for RGBA<T, A>

impl<T> From<RGB<T>> for BGR<T>

impl<T> From<RGBA<T, T>> for BGRA<T>

impl<T> From<BGR<T>> for RGB<T>

impl<T> From<BGRA<T, T>> for RGBA<T>

impl<T: Copy> From<RGB<T>> for RGBA<T, u8>

impl<T: Copy> From<RGB<T>> for BGRA<T, u8>

impl<T: Copy> From<RGB<T>> for RGBA<T, u16>

impl<T: Copy> From<RGB<T>> for BGRA<T, u16>

impl<T: Copy> From<BGR<T>> for BGRA<T, u8>

impl<T: Copy> From<BGR<T>> for RGBA<T, u8>

impl<T: Copy> From<BGR<T>> for BGRA<T, u16>

impl<T: Copy> From<BGR<T>> for RGBA<T, u16>

impl<T: Copy> From<T> for Gray<T>

impl<T: Copy> From<Gray<T>> for GrayAlpha<T, u8>

impl<T: Copy> From<Gray<T>> for GrayAlpha<T, u16>

impl From<Okm<'_, &'static Algorithm>> for UnboundKey

impl From<Okm<'_, &'static Algorithm>> for HeaderProtectionKey

impl From<EndOfInput> for Unspecified

impl From<TryFromSliceError> for Unspecified

impl From<KeyRejected> for Unspecified

impl From<Okm<'_, Algorithm>> for Salt

impl From<Okm<'_, Algorithm>> for Prk

impl From<Okm<'_, Algorithm>> for Key

impl<'a> From<&'a [u8]> for SeekKey<'a>

impl<'a> From<&'a str> for ColumnFamilyDescriptor<'a>

impl<'a> From<(&'a str, ColumnFamilyOptions)> for ColumnFamilyDescriptor<'a>

impl<E> From<Error> for RusotoError<E>

impl<E> From<CredentialsError> for RusotoError<E>

impl<E> From<HttpDispatchError> for RusotoError<E>

impl<E> From<Error> for RusotoError<E>

impl From<Error> for HttpDispatchError

impl From<Error> for HttpDispatchError

impl From<String> for Secret

impl From<AwsCredentials> for StaticProvider

impl<T, E> From<T> for Variable<T, E> where
    T: Clone

impl<E> From<&'_ str> for Variable<String, E>

impl From<ParseError> for CredentialsError

impl From<Error> for CredentialsError

impl From<Error> for CredentialsError

impl From<Error> for CredentialsError

impl From<VarError> for CredentialsError

impl From<FromUtf8Error> for CredentialsError

impl From<Vec<u8, Global>> for ByteStream

impl From<Error> for ReadlineError

impl From<ErrorKind> for ReadlineError

impl From<Error> for ReadlineError

impl From<Identifier> for Identifier

impl From<Version> for Version

impl From<(u64, u64, u64)> for Version

impl From<RangeSet> for VersionReq

impl From<Identifier> for Identifier

impl From<String> for ReqParseError

impl<'input> From<Error> for Error<'input>

impl From<Error> for Error

impl From<i8> for Value

impl From<i16> for Value

impl From<i32> for Value

impl From<i64> for Value

impl From<isize> for Value

impl From<u8> for Value

impl From<u16> for Value

impl From<u32> for Value

impl From<u64> for Value

impl From<usize> for Value

impl From<f32> for Value

impl From<f64> for Value

impl From<bool> for Value

impl From<String> for Value

impl<'a> From<&'a str> for Value

impl<'a> From<Cow<'a, str>> for Value

impl From<Number> for Value

impl From<Map<String, Value>> for Value

impl<T: Into<Value>> From<Vec<T, Global>> for Value

impl<'a, T: Clone + Into<Value>> From<&'a [T]> for Value

impl From<()> for Value

impl From<u8> for Number

impl From<u16> for Number

impl From<u32> for Number

impl From<u64> for Number

impl From<usize> for Number

impl From<i8> for Number

impl From<i16> for Number

impl From<i32> for Number

impl From<i64> for Number

impl From<isize> for Number

impl<'a, D: Drain> From<PoisonError<MutexGuard<'a, D>>> for MutexDrainError<D>

impl<V: Value> From<(&'static str, V)> for SingleKV<V>

impl<T> From<OwnedKV<T>> for OwnedKVList where
    T: SendSyncRefUnwindSafeKV + 'static, 

impl From<Error> for Error

impl From<Error> for Error

impl<T> From<TrySendError<T>> for AsyncError

impl<T> From<TryLockError<T>> for AsyncError

impl<T> From<SendError<T>> for AsyncError

impl<T> From<PoisonError<T>> for AsyncError

impl From<LayoutError> for CollectionAllocErr

impl<'a, A: Array> From<&'a [<A as Array>::Item]> for SmallVec<A> where
    A::Item: Clone

impl<A: Array> From<Vec<<A as Array>::Item, Global>> for SmallVec<A>

impl<A: Array> From<A> for SmallVec<A>

impl From<SocketAddrV4> for SockAddr

impl From<SocketAddrV6> for SockAddr

impl From<SocketAddr> for SockAddr

impl From<TcpStream> for Socket

impl From<TcpListener> for Socket

impl From<UdpSocket> for Socket

impl From<i32> for Domain

impl From<Domain> for c_int

impl From<i32> for Type

impl From<Type> for c_int

impl From<i32> for Protocol

impl From<Protocol> for c_int

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Canceled> for Error

impl From<Error> for Error

impl From<ParseIntError> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<String> for Error

impl From<u8> for Choice

impl<'a, S> From<S> for Name<'a> where
    S: Into<Cow<'a, str>>, 

impl From<SelfValue> for Ident

impl From<SelfType> for Ident

impl From<Super> for Ident

impl From<Crate> for Ident

impl From<Extern> for Ident

impl From<Underscore> for Ident

impl From<Path> for Meta

impl From<MetaList> for Meta

impl From<MetaNameValue> for Meta

impl From<Meta> for NestedMeta

impl From<Lit> for NestedMeta

impl From<FieldsNamed> for Fields

impl From<FieldsUnnamed> for Fields

impl From<VisPublic> for Visibility

impl From<VisCrate> for Visibility

impl From<VisRestricted> for Visibility

impl From<ExprArray> for Expr

impl From<ExprAssign> for Expr

impl From<ExprAssignOp> for Expr

impl From<ExprAsync> for Expr

impl From<ExprAwait> for Expr

impl From<ExprBinary> for Expr

impl From<ExprBlock> for Expr

impl From<ExprBox> for Expr

impl From<ExprBreak> for Expr

impl From<ExprCall> for Expr

impl From<ExprCast> for Expr

impl From<ExprClosure> for Expr

impl From<ExprContinue> for Expr

impl From<ExprField> for Expr

impl From<ExprForLoop> for Expr

impl From<ExprGroup> for Expr

impl From<ExprIf> for Expr

impl From<ExprIndex> for Expr

impl From<ExprLet> for Expr

impl From<ExprLit> for Expr

impl From<ExprLoop> for Expr

impl From<ExprMacro> for Expr

impl From<ExprMatch> for Expr

impl From<ExprMethodCall> for Expr

impl From<ExprParen> for Expr

impl From<ExprPath> for Expr

impl From<ExprRange> for Expr

impl From<ExprReference> for Expr

impl From<ExprRepeat> for Expr

impl From<ExprReturn> for Expr

impl From<ExprStruct> for Expr

impl From<ExprTry> for Expr

impl From<ExprTryBlock> for Expr

impl From<ExprTuple> for Expr

impl From<ExprType> for Expr

impl From<ExprUnary> for Expr

impl From<ExprUnsafe> for Expr

impl From<ExprWhile> for Expr

impl From<ExprYield> for Expr

impl From<usize> for Index

impl From<TypeParam> for GenericParam

impl From<LifetimeDef> for GenericParam

impl From<ConstParam> for GenericParam

impl From<Ident> for TypeParam

impl From<TraitBound> for TypeParamBound

impl From<Lifetime> for TypeParamBound

impl From<PredicateType> for WherePredicate

impl From<PredicateLifetime> for WherePredicate

impl From<PredicateEq> for WherePredicate

impl From<ItemConst> for Item

impl From<ItemEnum> for Item

impl From<ItemExternCrate> for Item

impl From<ItemFn> for Item

impl From<ItemForeignMod> for Item

impl From<ItemImpl> for Item

impl From<ItemMacro> for Item

impl From<ItemMacro2> for Item

impl From<ItemMod> for Item

impl From<ItemStatic> for Item

impl From<ItemStruct> for Item

impl From<ItemTrait> for Item

impl From<ItemTraitAlias> for Item

impl From<ItemType> for Item

impl From<ItemUnion> for Item

impl From<ItemUse> for Item

impl From<DeriveInput> for Item

impl From<ItemStruct> for DeriveInput

impl From<ItemEnum> for DeriveInput

impl From<ItemUnion> for DeriveInput

impl From<UsePath> for UseTree

impl From<UseName> for UseTree

impl From<UseRename> for UseTree

impl From<UseGlob> for UseTree

impl From<UseGroup> for UseTree

impl From<ForeignItemFn> for ForeignItem

impl From<ForeignItemStatic> for ForeignItem

impl From<ForeignItemType> for ForeignItem

impl From<ForeignItemMacro> for ForeignItem

impl From<TraitItemConst> for TraitItem

impl From<TraitItemMethod> for TraitItem

impl From<TraitItemType> for TraitItem

impl From<TraitItemMacro> for TraitItem

impl From<ImplItemConst> for ImplItem

impl From<ImplItemMethod> for ImplItem

impl From<ImplItemType> for ImplItem

impl From<ImplItemMacro> for ImplItem

impl From<Receiver> for FnArg

impl From<PatType> for FnArg

impl From<LitStr> for Lit

impl From<LitByteStr> for Lit

impl From<LitByte> for Lit

impl From<LitChar> for Lit

impl From<LitInt> for Lit

impl From<LitFloat> for Lit

impl From<LitBool> for Lit

impl From<Literal> for LitInt

impl From<Literal> for LitFloat

impl From<DataStruct> for Data

impl From<DataEnum> for Data

impl From<DataUnion> for Data

impl From<TypeArray> for Type

impl From<TypeBareFn> for Type

impl From<TypeGroup> for Type

impl From<TypeImplTrait> for Type

impl From<TypeInfer> for Type

impl From<TypeMacro> for Type

impl From<TypeNever> for Type

impl From<TypeParen> for Type

impl From<TypePath> for Type

impl From<TypePtr> for Type

impl From<TypeReference> for Type

impl From<TypeSlice> for Type

impl From<TypeTraitObject> for Type

impl From<TypeTuple> for Type

impl From<PatBox> for Pat

impl From<PatIdent> for Pat

impl From<PatLit> for Pat

impl From<PatMacro> for Pat

impl From<PatOr> for Pat

impl From<PatPath> for Pat

impl From<PatRange> for Pat

impl From<PatReference> for Pat

impl From<PatRest> for Pat

impl From<PatSlice> for Pat

impl From<PatStruct> for Pat

impl From<PatTuple> for Pat

impl From<PatTupleStruct> for Pat

impl From<PatType> for Pat

impl From<PatWild> for Pat

impl<T> From<T> for Path where
    T: Into<PathSegment>, 

impl<T> From<T> for PathSegment where
    T: Into<Ident>, 

impl From<LexError> for Error

impl From<Receiver> for FnArg

impl From<PatType> for FnArg

impl From<PatIdent> for Pat

impl From<PatPath> for Pat

impl From<PatReference> for Pat

impl From<PatStruct> for Pat

impl From<PatTuple> for Pat

impl From<PatTupleStruct> for Pat

impl From<PatType> for Pat

impl From<PatWild> for Pat

impl From<u32> for ProcessStatus

impl From<char> for ProcessStatus

impl From<Error> for Error

impl From<StatusCode> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<DecodeError> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<PathPersistError> for TempPath

impl From<PersistError> for NamedTempFile

impl From<FromUtf8Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for EvaluateError

impl From<DeadlineError> for EvaluateError

impl From<Infallible> for EvaluateError

impl From<Utf8Error> for EvaluateError

impl From<FromUtf8Error> for EvaluateError

impl From<Error> for StorageError

impl From<Box<ErrorInner, Global>> for Error

impl From<ErrorInner> for Error

impl From<StorageError> for Error

impl From<EvaluateError> for Error

impl<T: Into<EvaluateError>> From<T> for Error

impl From<IntervalRange> for Range

impl From<PointRange> for Range

impl From<(Vec<u8, Global>, Vec<u8, Global>)> for IntervalRange

impl From<(String, String)> for IntervalRange

impl<'a, 'b> From<(&'a str, &'b str)> for IntervalRange

impl From<Vec<u8, Global>> for PointRange

impl From<String> for PointRange

impl<'a> From<&'a str> for PointRange

impl<'a, 'b> From<&'b [(&'a [u8], &'a [u8])]> for FixtureStorage

impl From<Vec<(Vec<u8, Global>, Vec<u8, Global>), Global>> for FixtureStorage

impl From<VectorValue> for LazyBatchColumn

impl From<Vec<LazyBatchColumn, Global>> for LazyBatchColumnVec

impl From<Vec<VectorValue, Global>> for LazyBatchColumnVec

impl From<Vec<Option<Vec<u8, Global>>, Global>> for ChunkedVecBytes

impl From<Vec<Option<Enum>, Global>> for ChunkedVecEnum

impl From<Vec<Option<Json>, Global>> for ChunkedVecJson

impl From<Vec<Option<Set>, Global>> for ChunkedVecSet

impl<T: Clone> From<Vec<Option<T>, Global>> for ChunkedVecSized<T>

impl From<Option<i64>> for ScalarValue

impl From<i64> for ScalarValue

impl From<Option<NotNan<f64>>> for ScalarValue

impl From<NotNan<f64>> for ScalarValue

impl From<Option<Decimal>> for ScalarValue

impl From<Decimal> for ScalarValue

impl From<Option<Vec<u8, Global>>> for ScalarValue

impl From<Vec<u8, Global>> for ScalarValue

impl From<Option<Time>> for ScalarValue

impl From<Time> for ScalarValue

impl From<Option<Duration>> for ScalarValue

impl From<Duration> for ScalarValue

impl From<Option<Json>> for ScalarValue

impl From<Json> for ScalarValue

impl From<Option<f64>> for ScalarValue

impl<'a> From<Option<JsonRef<'a>>> for ScalarValue

impl<'a> From<Option<&'a [u8]>> for ScalarValue

impl From<f64> for ScalarValue

impl From<ChunkedVecSized<i64>> for VectorValue

impl From<ChunkedVecSized<NotNan<f64>>> for VectorValue

impl From<ChunkedVecSized<Decimal>> for VectorValue

impl From<ChunkedVecBytes> for VectorValue

impl From<ChunkedVecSized<Time>> for VectorValue

impl From<ChunkedVecSized<Duration>> for VectorValue

impl From<ChunkedVecJson> for VectorValue

impl From<ChunkedVecEnum> for VectorValue

impl From<ChunkedVecSet> for VectorValue

impl From<bool> for Datum

impl<T: Into<Datum>> From<Option<T>> for Datum

impl<'a, T: Clone + Into<Datum>> From<Cow<'a, T>> for Datum

impl From<Vec<u8, Global>> for Datum

impl<'a> From<&'a [u8]> for Datum

impl<'a> From<Cow<'a, [u8]>> for Datum

impl From<Duration> for Datum

impl From<i64> for Datum

impl From<u64> for Datum

impl From<Decimal> for Datum

impl From<Time> for Datum

impl From<f64> for Datum

impl From<Json> for Datum

impl From<Utf8Error> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<FromUtf8Error> for Error

impl From<Error> for Error

impl From<ParseFloatError> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<DataTypeError> for Error

impl<T> From<Res<T>> for Result<T>

impl From<u32> for Decimal

impl From<u16> for Decimal

impl From<u8> for Decimal

impl From<i32> for Decimal

impl From<i16> for Decimal

impl From<i8> for Decimal

impl From<usize> for Decimal

impl From<isize> for Decimal

impl From<i64> for Decimal

impl From<u64> for Decimal

impl From<TimeType> for FieldTypeTp

impl From<Vec<RpnExpressionNode, Global>> for RpnExpression

impl From<&'_ str> for Module

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<StorageError> for Error

impl From<EvaluateError> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<DeadlineError> for Error

impl From<DataTypeError> for Error

impl From<Error> for Error

impl From<GcKeysCF> for CF

impl From<GcKeysDetail> for ScanKind

impl From<Error> for PluginLoadingError

impl From<SemVerError> for PluginLoadingError

impl From<Error> for PluginErrorShim

impl From<Canceled> for PluginErrorShim

impl From<Vec<FuturePool, Global>> for ReadPool

impl From<Full> for ReadPoolError

impl From<Canceled> for ReadPoolError

impl From<ErrorHeaderKind> for RequestStatusKind

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl<'a> From<Option<&'a str>> for BottommostLevelCompaction

impl From<BottommostLevelCompaction> for BottommostLevelCompaction

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Error> for Error

impl From<ProtobufError> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<AddrParseError> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<ScheduleError<Task>> for Error

impl From<Canceled> for Error

impl From<Error> for Error

impl From<ErrorStack> for Error

impl From<StateRole> for Role

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<ProgressState> for RaftProgressState

impl From<StateRole> for RaftStateRole

impl<'a> From<Status<'a>> for RaftStatus

impl From<PeerRole> for RaftPeerRole

impl From<Error> for ErrorInner

impl From<Error> for ErrorInner

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for ErrorInner

impl From<Error> for ErrorInner

impl From<DeadlineError> for ErrorInner

impl From<Box<ErrorInner, Global>> for Error

impl From<ErrorInner> for Error

impl<T: Into<ErrorInner>> From<T> for Error

impl From<u64> for WaitTimeout

impl From<GcKeysCF> for GcKeysCF

impl From<GcKeysDetail> for GcKeysDetail

impl From<Error> for ErrorInner

impl From<Error> for ErrorInner

impl From<Error> for ErrorInner

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for ErrorInner

impl From<Box<ErrorInner, Global>> for Error

impl From<ErrorInner> for Error

impl<T: Into<ErrorInner>> From<T> for Error

impl From<Error> for ErrorInner

impl From<Error> for ErrorInner

impl From<Error> for ErrorInner

impl<S: Snapshot> From<S> for TTLSnapshot<S>

impl<T: StorageCallbackType> From<Command> for TypedCommand<T>

impl<T> From<TypedCommand<T>> for Command

impl From<PrewriteRequest> for TypedCommand<PrewriteResult>

impl From<PessimisticLockRequest> for TypedCommand<StorageResult<PessimisticLockRes>>

impl From<CommitRequest> for TypedCommand<TxnStatus>

impl From<CleanupRequest> for TypedCommand<()>

impl From<BatchRollbackRequest> for TypedCommand<()>

impl From<PessimisticRollbackRequest> for TypedCommand<Vec<StorageResult<()>>>

impl From<TxnHeartBeatRequest> for TypedCommand<TxnStatus>

impl From<CheckTxnStatusRequest> for TypedCommand<TxnStatus>

impl From<CheckSecondaryLocksRequest> for TypedCommand<SecondaryLocksStatus>

impl From<ResolveLockRequest> for TypedCommand<()>

impl From<MvccGetByKeyRequest> for TypedCommand<MvccInfo>

impl From<MvccGetByStartTsRequest> for TypedCommand<Option<(Key, MvccInfo)>>

impl From<Error> for ErrorInner

impl From<Error> for ErrorInner

impl From<ProtobufError> for ErrorInner

impl From<Error> for ErrorInner

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for ErrorInner

impl From<Error> for ErrorInner

impl From<Box<ErrorInner, Global>> for Error

impl From<ErrorInner> for Error

impl<T: Into<ErrorInner>> From<T> for Error

impl From<Error> for ProfError

impl From<NulError> for ProfError

impl From<&'static str> for Id

impl From<u64> for Id

impl From<NonZeroU64> for Id

impl From<Error> for Error

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for ErrorInner

impl From<Error> for ErrorInner

impl From<Error> for ErrorInner

impl From<Box<ErrorInner, Global>> for Error

impl From<ErrorInner> for Error

impl<T: Into<ErrorInner>> From<T> for Error

impl From<Error> for Error

impl From<ConfigValue> for ReadableSize

impl From<Option<ReadableSize>> for OptionReadableSize

impl From<OptionReadableSize> for Option<ReadableSize>

impl From<ConfigValue> for OptionReadableSize

impl From<ReadableDuration> for Duration

impl From<ConfigValue> for ReadableDuration

impl From<Box<dyn Error + 'static + Sync + Send, Global>> for Error

impl From<Error> for Error

impl From<StripPrefixError> for Error

impl From<ConversionRange> for Error

impl From<ComponentRange> for Error

impl From<Error> for Error

impl From<IndeterminateOffset> for Error

impl From<Error> for Format

impl From<Format> for Error

impl<T: AsRef<str>> From<T> for Format

impl From<ComponentRange> for Error

impl From<Instant> for Instant

impl From<SystemTime> for OffsetDateTime

impl From<SystemTime> for PrimitiveDateTime

impl From<File> for File

impl From<OpenOptions> for OpenOptions

impl<RW> From<BufReader<BufWriter<RW>>> for BufStream<RW>

impl<RW> From<BufWriter<BufReader<RW>>> for BufStream<RW>

impl From<Command> for Command

impl From<JoinError> for Error

impl<T> From<(T, TrySendError)> for SendError<T>

impl<T> From<(T, TrySendError)> for TrySendError<T>

impl<T> From<SendError<T>> for TrySendError<T>

impl<T> From<T> for Mutex<T>

impl<T> From<T> for RwLock<T>

impl From<Instant> for Instant

impl From<Elapsed> for Error

impl From<TlsConnector> for TlsConnector

impl From<TlsAcceptor> for TlsAcceptor

impl From<Error> for LinesCodecError

impl<'a> From<&'a str> for Value

impl<V: Into<Value>> From<Vec<V, Global>> for Value

impl<S: Into<String>, V: Into<Value>> From<BTreeMap<S, V>> for Value

impl<S: Into<String> + Hash + Eq, V: Into<Value>> From<HashMap<S, V, RandomState>> for Value

impl From<String> for Value

impl From<i64> for Value

impl From<i32> for Value

impl From<i8> for Value

impl From<u8> for Value

impl From<u32> for Value

impl From<f64> for Value

impl From<f32> for Value

impl From<bool> for Value

impl From<Map<String, Value>> for Value

impl<S> From<S> for Dispatch where
    S: Subscriber + Send + Sync + 'static, 

impl From<Level> for LevelFilter

impl From<Option<Level>> for LevelFilter

impl From<u64> for TimeStamp

impl From<&'_ u64> for TimeStamp

impl From<Mutation> for Mutation

impl From<Error> for ErrorInner

impl From<Error> for ErrorInner

impl From<Box<ErrorInner, Global>> for Error

impl From<ErrorInner> for Error

impl<T: Into<ErrorInner>> From<T> for Error

impl<S> From<Ascii<S>> for UniCase<S>

impl<S: AsRef<str>> From<S> for UniCase<S>

impl<'a> From<&'a str> for UniCase<Cow<'a, str>>

impl<'a> From<String> for UniCase<Cow<'a, str>>

impl<'a> From<&'a str> for UniCase<String>

impl<'a> From<Cow<'a, str>> for UniCase<String>

impl<'a> From<&'a String> for UniCase<&'a str>

impl From<u8> for Level

impl<'a> From<&'a [u8]> for Input<'a>

impl From<Errors> for ParseError

impl From<Uuid> for Hyphenated

impl<'a> From<&'a Uuid> for HyphenatedRef<'a>

impl From<Uuid> for Simple

impl<'a> From<&'a Uuid> for SimpleRef<'a>

impl From<Uuid> for Urn

impl<'a> From<&'a Uuid> for UrnRef<'a>

impl<'a> From<&'a str> for Name<'a>

impl<'a> From<(&'a str, &'a str)> for Name<'a>

impl<'a> From<Name<'a>> for OwnedName

impl<'a, P, M> From<(&'a P, M)> for Error where
    P: Position,
    M: Into<Cow<'static, str>>, 

impl From<Error> for Error

impl From<Error> for EmitterError

impl<'a> From<&'a str> for XmlEvent<'a>

impl<'a> From<EndElementBuilder<'a>> for XmlEvent<'a>

impl<'a> From<StartElementBuilder<'a>> for XmlEvent<'a>

impl From<Builder> for QueueType

impl<Z> From<Z> for Zeroizing<Z> where
    Z: Zeroize