1.0.0[−][src]Trait nom::lib::std::convert::From
Simple and safe type conversions in to Self
. It is the reciprocal of
Into
.
This trait is useful when performing error handling as described by
the book and is closely related to the ?
operator.
When constructing a function that is capable of failing the return type
will generally be of the form Result<T, E>
.
The From
trait allows for simplification of error handling by providing a
means of returning a single error type that encapsulates numerous possible
erroneous situations.
This trait is not limited to error handling, rather the general case for this trait would be in any type conversions to have an explicit definition of how they are performed.
Note: this trait must not fail. If the conversion can fail, use
TryFrom
or a dedicated method which returns an Option<T>
or a
Result<T, E>
.
Generic Implementations
Examples
String
implements From<&str>
:
let string = "hello".to_string(); let other_string = String::from("hello"); assert_eq!(string, other_string);
An example usage for error handling:
use std::io::{self, Read}; 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 file = std::fs::File::open("test")?; let mut contents = String::new(); file.read_to_string(&mut contents)?; let num: i32 = contents.trim().parse()?; Ok(num) }
Required Methods
fn from(T) -> Self
Performs the conversion.
Implementations on Foreign Types
impl<T> From<T> for Mutex<T>
[src]
impl<T> From<T> for Mutex<T>
fn from(t: T) -> Mutex<T>
[src]
fn from(t: T) -> Mutex<T>
Creates a new mutex in an unlocked state ready for use.
This is equivalent to [Mutex::new
].
impl From<Ipv6Addr> for u128
[src]
impl From<Ipv6Addr> for u128
impl From<OsString> for PathBuf
[src]
impl From<OsString> for PathBuf
impl<'a> From<Cow<'a, Path>> for PathBuf
[src]
impl<'a> From<Cow<'a, Path>> for PathBuf
impl<'a> From<&'a Path> for Rc<Path>
[src]
impl<'a> From<&'a Path> for Rc<Path>
impl<'a> From<&'a CStr> for CString
[src]
impl<'a> From<&'a CStr> for CString
impl<'a> From<&'a OsStr> for Rc<OsStr>
[src]
impl<'a> From<&'a OsStr> for Rc<OsStr>
impl<'a> From<&'a Path> for Cow<'a, Path>
[src]
impl<'a> From<&'a Path> for Cow<'a, Path>
impl From<String> for OsString
[src]
impl From<String> for OsString
fn from(s: String) -> OsString
[src]
fn from(s: String) -> OsString
Converts a [String
] into a [OsString
].
The conversion copies the data, and includes an allocation on the heap.
impl From<File> for Stdio
[src]
impl From<File> for Stdio
impl<'a> From<OsString> for Cow<'a, OsStr>
[src]
impl<'a> From<OsString> for Cow<'a, OsStr>
impl From<[u8; 4]> for Ipv4Addr
[src]
impl From<[u8; 4]> for Ipv4Addr
fn from(octets: [u8; 4]) -> Ipv4Addr
[src]
fn from(octets: [u8; 4]) -> Ipv4Addr
Examples
use std::net::Ipv4Addr; let addr = Ipv4Addr::from([13u8, 12u8, 11u8, 10u8]); assert_eq!(Ipv4Addr::new(13, 12, 11, 10), addr);
impl From<ChildStderr> for Stdio
[src]
impl From<ChildStderr> for Stdio
fn from(child: ChildStderr) -> Stdio
[src]
fn from(child: ChildStderr) -> Stdio
impl<'a, T> From<&'a T> for OsString where
T: AsRef<OsStr> + ?Sized,
[src]
impl<'a, T> From<&'a T> for OsString where
T: AsRef<OsStr> + ?Sized,
impl From<Box<OsStr>> for OsString
[src]
impl From<Box<OsStr>> for OsString
fn from(boxed: Box<OsStr>) -> OsString
[src]
fn from(boxed: Box<OsStr>) -> OsString
Converts a Box<OsStr>
into a OsString
without copying or allocating.
impl<'a> From<&'a PathBuf> for Cow<'a, Path>
[src]
impl<'a> From<&'a PathBuf> for Cow<'a, Path>
impl From<[u8; 16]> for IpAddr
[src]
impl From<[u8; 16]> for IpAddr
fn from(octets: [u8; 16]) -> IpAddr
[src]
fn from(octets: [u8; 16]) -> IpAddr
Create 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<DefaultEnvKey> for OsString
[src]
impl From<DefaultEnvKey> for OsString
impl From<[u8; 4]> for IpAddr
[src]
impl From<[u8; 4]> for IpAddr
fn from(octets: [u8; 4]) -> IpAddr
[src]
fn from(octets: [u8; 4]) -> IpAddr
Create 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<'a> From<&'a CStr> for Cow<'a, CStr>
[src]
impl<'a> From<&'a CStr> for Cow<'a, CStr>
impl<'a, T> From<&'a T> for PathBuf where
T: AsRef<OsStr> + ?Sized,
[src]
impl<'a, T> From<&'a T> for PathBuf where
T: AsRef<OsStr> + ?Sized,
impl From<PathBuf> for Arc<Path>
[src]
impl From<PathBuf> for Arc<Path>
impl From<ChildStdin> for Stdio
[src]
impl From<ChildStdin> for Stdio
fn from(child: ChildStdin) -> Stdio
[src]
fn from(child: ChildStdin) -> Stdio
impl From<ErrorKind> for Error
[src]
impl From<ErrorKind> for Error
Intended for use for errors not exposed to the user, where allocating onto the heap (for normal construction via Error::new) is too costly.
impl From<RecvError> for TryRecvError
[src]
impl From<RecvError> for TryRecvError
fn from(err: RecvError) -> TryRecvError
[src]
fn from(err: RecvError) -> TryRecvError
impl From<[u16; 8]> for Ipv6Addr
[src]
impl From<[u16; 8]> for Ipv6Addr
impl<'a> From<&'a CString> for Cow<'a, CStr>
[src]
impl<'a> From<&'a CString> for Cow<'a, CStr>
impl<T> From<T> for RwLock<T>
[src]
impl<T> From<T> for RwLock<T>
fn from(t: T) -> RwLock<T>
[src]
fn from(t: T) -> RwLock<T>
Creates a new instance of an RwLock<T>
which is unlocked.
This is equivalent to [RwLock::new
].
impl From<ChildStdout> for Stdio
[src]
impl From<ChildStdout> for Stdio
fn from(child: ChildStdout) -> Stdio
[src]
fn from(child: ChildStdout) -> Stdio
impl From<Ipv6Addr> for IpAddr
[src]
impl From<Ipv6Addr> for IpAddr
impl From<PathBuf> for OsString
[src]
impl From<PathBuf> for OsString
impl From<Box<Path>> for PathBuf
[src]
impl From<Box<Path>> for PathBuf
impl From<[u8; 16]> for Ipv6Addr
[src]
impl From<[u8; 16]> for Ipv6Addr
impl<'a> From<&'a OsStr> for Cow<'a, OsStr>
[src]
impl<'a> From<&'a OsStr> for Cow<'a, OsStr>
impl From<NulError> for Error
[src]
impl From<NulError> for Error
impl From<Ipv4Addr> for IpAddr
[src]
impl From<Ipv4Addr> for IpAddr
impl From<Ipv4Addr> for u32
[src]
impl From<Ipv4Addr> for u32
fn from(ip: Ipv4Addr) -> u32
[src]
fn from(ip: Ipv4Addr) -> u32
Convert an Ipv4Addr
into a host byte order u32
.
Examples
use std::net::Ipv4Addr; let addr = Ipv4Addr::new(13, 12, 11, 10); assert_eq!(0x0d0c0b0au32, u32::from(addr));
impl From<CString> for Arc<CStr>
[src]
impl From<CString> for Arc<CStr>
impl<I> From<(I, u16)> for SocketAddr where
I: Into<IpAddr>,
[src]
impl<I> From<(I, u16)> for SocketAddr where
I: Into<IpAddr>,
impl From<SocketAddrV6> for SocketAddr
[src]
impl From<SocketAddrV6> for SocketAddr
fn from(sock6: SocketAddrV6) -> SocketAddr
[src]
fn from(sock6: SocketAddrV6) -> SocketAddr
impl From<PathBuf> for Rc<Path>
[src]
impl From<PathBuf> for Rc<Path>
impl<T> From<PoisonError<T>> for TryLockError<T>
[src]
impl<T> From<PoisonError<T>> for TryLockError<T>
fn from(err: PoisonError<T>) -> TryLockError<T>
[src]
fn from(err: PoisonError<T>) -> TryLockError<T>
impl From<Box<CStr>> for CString
[src]
impl From<Box<CStr>> for CString
impl From<u32> for Ipv4Addr
[src]
impl From<u32> for Ipv4Addr
fn from(ip: u32) -> Ipv4Addr
[src]
fn from(ip: u32) -> Ipv4Addr
Convert a host byte order u32
into an Ipv4Addr
.
Examples
use std::net::Ipv4Addr; let addr = Ipv4Addr::from(0x0d0c0b0au32); assert_eq!(Ipv4Addr::new(13, 12, 11, 10), addr);
impl<T> From<SendError<T>> for TrySendError<T>
[src]
impl<T> From<SendError<T>> for TrySendError<T>
fn from(err: SendError<T>) -> TrySendError<T>
[src]
fn from(err: SendError<T>) -> TrySendError<T>
impl From<OsString> for Arc<OsStr>
[src]
impl From<OsString> for Arc<OsStr>
impl From<String> for PathBuf
[src]
impl From<String> for PathBuf
impl From<OsString> for Rc<OsStr>
[src]
impl From<OsString> for Rc<OsStr>
impl<'a> From<PathBuf> for Cow<'a, Path>
[src]
impl<'a> From<PathBuf> for Cow<'a, Path>
impl<'a> From<&'a Path> for Arc<Path>
[src]
impl<'a> From<&'a Path> for Arc<Path>
impl From<SocketAddrV4> for SocketAddr
[src]
impl From<SocketAddrV4> for SocketAddr
fn from(sock4: SocketAddrV4) -> SocketAddr
[src]
fn from(sock4: SocketAddrV4) -> SocketAddr
impl<'a> From<Cow<'a, OsStr>> for OsString
[src]
impl<'a> From<Cow<'a, OsStr>> for OsString
impl From<CString> for Rc<CStr>
[src]
impl From<CString> for Rc<CStr>
impl From<RecvError> for RecvTimeoutError
[src]
impl From<RecvError> for RecvTimeoutError
fn from(err: RecvError) -> RecvTimeoutError
[src]
fn from(err: RecvError) -> RecvTimeoutError
impl<W> From<IntoInnerError<W>> for Error
[src]
impl<W> From<IntoInnerError<W>> for Error
fn from(iie: IntoInnerError<W>) -> Error
[src]
fn from(iie: IntoInnerError<W>) -> Error
impl<'a> From<Cow<'a, CStr>> for CString
[src]
impl<'a> From<Cow<'a, CStr>> for CString
impl From<u128> for Ipv6Addr
[src]
impl From<u128> for Ipv6Addr
impl From<[u16; 8]> for IpAddr
[src]
impl From<[u16; 8]> for IpAddr
fn from(segments: [u16; 8]) -> IpAddr
[src]
fn from(segments: [u16; 8]) -> IpAddr
Create 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<'a> From<&'a OsString> for Cow<'a, OsStr>
[src]
impl<'a> From<&'a OsString> for Cow<'a, OsStr>
impl<'a> From<&'a OsStr> for Arc<OsStr>
[src]
impl<'a> From<&'a OsStr> for Arc<OsStr>
impl<'a> From<&'a CStr> for Arc<CStr>
[src]
impl<'a> From<&'a CStr> for Arc<CStr>
impl<'a> From<CString> for Cow<'a, CStr>
[src]
impl<'a> From<CString> for Cow<'a, CStr>
impl<'a> From<&'a CStr> for Rc<CStr>
[src]
impl<'a> From<&'a CStr> for Rc<CStr>
impl From<i8> for isize
[src]
impl From<i8> for isize
Converts i8
to isize
losslessly.
impl From<i8> for i64
[src]
impl From<i8> for i64
Converts i8
to i64
losslessly.
impl From<i8> for i16
[src]
impl From<i8> for i16
Converts i8
to i16
losslessly.
impl From<u8> for u128
[src]
impl From<u8> for u128
Converts u8
to u128
losslessly.
impl From<u32> for u64
[src]
impl From<u32> for u64
Converts u32
to u64
losslessly.
impl From<i16> for i32
[src]
impl From<i16> for i32
Converts i16
to i32
losslessly.
impl From<u8> for i128
[src]
impl From<u8> for i128
Converts u8
to i128
losslessly.
impl From<u16> for u32
[src]
impl From<u16> for u32
Converts u16
to u32
losslessly.
impl From<i64> for AtomicI64
[src]
impl From<i64> for AtomicI64
impl<T> From<T> for Cell<T>
[src]
impl<T> From<T> for Cell<T>
impl From<u16> for u128
[src]
impl From<u16> for u128
Converts u16
to u128
losslessly.
impl From<bool> for u128
[src]
impl From<bool> for u128
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]
impl From<u8> for i32
Converts u8
to i32
losslessly.
impl From<i8> for f64
[src]
impl From<i8> for f64
Converts i8
to f64
losslessly.
impl From<i8> for f32
[src]
impl From<i8> for f32
Converts i8
to f32
losslessly.
impl From<u8> for u32
[src]
impl From<u8> for u32
Converts u8
to u32
losslessly.
impl<T> From<T> for RefCell<T>
[src]
impl<T> From<T> for RefCell<T>
impl From<u16> for u64
[src]
impl From<u16> for u64
Converts u16
to u64
losslessly.
impl From<i8> for i32
[src]
impl From<i8> for i32
Converts i8
to i32
losslessly.
impl From<u16> for i64
[src]
impl From<u16> for i64
Converts u16
to i64
losslessly.
impl From<u8> for i64
[src]
impl From<u8> for i64
Converts u8
to i64
losslessly.
impl<T> From<*mut T> for AtomicPtr<T>
[src]
impl<T> From<*mut T> for AtomicPtr<T>
impl From<f32> for f64
[src]
impl From<f32> for f64
Converts f32
to f64
losslessly.
impl From<usize> for AtomicUsize
[src]
impl From<usize> for AtomicUsize
fn from(v: usize) -> AtomicUsize
[src]
fn from(v: usize) -> AtomicUsize
impl From<u64> for u128
[src]
impl From<u64> for u128
Converts u64
to u128
losslessly.
impl From<u16> for AtomicU16
[src]
impl From<u16> for AtomicU16
impl From<bool> for i64
[src]
impl From<bool> for i64
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 From<i32> for f64
[src]
impl From<i32> for f64
Converts i32
to f64
losslessly.
impl From<u8> for i16
[src]
impl From<u8> for i16
Converts u8
to i16
losslessly.
impl From<u8> for f32
[src]
impl From<u8> for f32
Converts u8
to f32
losslessly.
impl From<i16> for AtomicI16
[src]
impl From<i16> for AtomicI16
impl From<u32> for f64
[src]
impl From<u32> for f64
Converts u32
to f64
losslessly.
impl From<u32> for i64
[src]
impl From<u32> for i64
Converts u32
to i64
losslessly.
impl From<i16> for f64
[src]
impl From<i16> for f64
Converts i16
to f64
losslessly.
impl From<u64> for AtomicU64
[src]
impl From<u64> for AtomicU64
impl<T> From<T> for UnsafeCell<T>
[src]
impl<T> From<T> for UnsafeCell<T>
fn from(t: T) -> UnsafeCell<T>
[src]
fn from(t: T) -> UnsafeCell<T>
impl<'a, T> From<FutureObj<'a, T>> for LocalFutureObj<'a, T>
[src]
impl<'a, T> From<FutureObj<'a, T>> for LocalFutureObj<'a, T>
fn from(f: FutureObj<'a, T>) -> LocalFutureObj<'a, T>
[src]
fn from(f: FutureObj<'a, T>) -> LocalFutureObj<'a, T>
impl From<i16> for i64
[src]
impl From<i16> for i64
Converts i16
to i64
losslessly.
impl From<isize> for AtomicIsize
[src]
impl From<isize> for AtomicIsize
fn from(v: isize) -> AtomicIsize
[src]
fn from(v: isize) -> AtomicIsize
impl From<u64> for i128
[src]
impl From<u64> for i128
Converts u64
to i128
losslessly.
impl From<u8> for f64
[src]
impl From<u8> for f64
Converts u8
to f64
losslessly.
impl<'a, T> From<&'a T> for NonNull<T> where
T: ?Sized,
[src]
impl<'a, T> From<&'a T> for NonNull<T> where
T: ?Sized,
impl From<u8> for char
[src]
impl From<u8> for char
Maps a byte in 0x00...0xFF to a char
whose code point has the same value, in U+0000 to 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.
impl From<u32> for AtomicU32
[src]
impl From<u32> for AtomicU32
impl From<bool> for u32
[src]
impl From<bool> for u32
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<'a, T> From<&'a mut T> for NonNull<T> where
T: ?Sized,
[src]
impl<'a, T> From<&'a mut T> for NonNull<T> where
T: ?Sized,
impl From<i16> for i128
[src]
impl From<i16> for i128
Converts i16
to i128
losslessly.
impl From<bool> for i128
[src]
impl From<bool> for i128
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<!> for TryFromIntError
[src]
impl From<!> for TryFromIntError
fn from(never: !) -> TryFromIntError
[src]
fn from(never: !) -> TryFromIntError
impl From<i16> for f32
[src]
impl From<i16> for f32
Converts i16
to f32
losslessly.
impl From<u8> for AtomicU8
[src]
impl From<u8> for AtomicU8
impl From<i32> for i128
[src]
impl From<i32> for i128
Converts i32
to i128
losslessly.
impl From<bool> for i16
[src]
impl From<bool> for i16
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<LocalWaker> for Waker
[src]
impl From<LocalWaker> for Waker
fn from(local_waker: LocalWaker) -> Waker
[src]
fn from(local_waker: LocalWaker) -> Waker
impl From<i64> for i128
[src]
impl From<i64> for i128
Converts i64
to i128
losslessly.
impl<T> From<T> for Poll<T>
[src]
impl<T> From<T> for Poll<T>
impl From<u8> for u16
[src]
impl From<u8> for u16
Converts u8
to u16
losslessly.
impl<T> From<Unique<T>> for NonNull<T> where
T: ?Sized,
[src]
impl<T> From<Unique<T>> for NonNull<T> where
T: ?Sized,
impl From<u16> for usize
[src]
impl From<u16> for usize
Converts u16
to usize
losslessly.
impl From<bool> for u16
[src]
impl From<bool> for u16
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<u8> for u64
[src]
impl From<u8> for u64
Converts u8
to u64
losslessly.
impl From<u16> for f32
[src]
impl From<u16> for f32
Converts u16
to f32
losslessly.
impl From<u16> for i128
[src]
impl From<u16> for i128
Converts u16
to i128
losslessly.
impl From<bool> for usize
[src]
impl From<bool> for usize
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 i32
[src]
impl From<u16> for i32
Converts u16
to i32
losslessly.
impl From<i32> for i64
[src]
impl From<i32> for i64
Converts i32
to i64
losslessly.
impl From<i16> for isize
[src]
impl From<i16> for isize
Converts i16
to isize
losslessly.
impl From<bool> for u64
[src]
impl From<bool> for u64
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<i8> for AtomicI8
[src]
impl From<i8> for AtomicI8
impl From<u16> for f64
[src]
impl From<u16> for f64
Converts u16
to f64
losslessly.
impl From<bool> for isize
[src]
impl From<bool> for isize
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<i32> for AtomicI32
[src]
impl From<i32> for AtomicI32
impl From<bool> for u8
[src]
impl From<bool> for u8
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<bool> for i32
[src]
impl From<bool> for i32
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<i8> for i128
[src]
impl From<i8> for i128
Converts i8
to i128
losslessly.
impl From<bool> for i8
[src]
impl From<bool> for i8
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<u8> for isize
[src]
impl From<u8> for isize
Converts u8
to isize
losslessly.
impl From<u8> for usize
[src]
impl From<u8> for usize
Converts u8
to usize
losslessly.
impl From<bool> for AtomicBool
[src]
impl From<bool> for AtomicBool
fn from(b: bool) -> AtomicBool
[src]
fn from(b: bool) -> AtomicBool
impl From<u32> for u128
[src]
impl From<u32> for u128
Converts u32
to u128
losslessly.
impl From<u32> for i128
[src]
impl From<u32> for i128
Converts u32
to i128
losslessly.
impl From<char> for u32
[src]
impl From<char> for u32
impl<'a> From<&'a str> for Arc<str>
[src]
impl<'a> From<&'a str> for Arc<str>
impl<T> From<Box<T>> for PinBox<T> where
T: ?Sized,
[src]
impl<T> From<Box<T>> for PinBox<T> where
T: ?Sized,
impl<'a, T> From<&'a [T]> for Arc<[T]> where
T: Clone,
[src]
impl<'a, T> From<&'a [T]> for Arc<[T]> where
T: Clone,
impl<T> From<Vec<T>> for Rc<[T]>
[src]
impl<T> From<Vec<T>> for Rc<[T]>
impl<T> From<T> for Arc<T>
[src]
impl<T> From<T> for Arc<T>
impl<'a, T> From<&'a [T]> for Cow<'a, [T]> where
T: Clone,
[src]
impl<'a, T> From<&'a [T]> for Cow<'a, [T]> where
T: Clone,
impl<'a> From<String> for Cow<'a, str>
[src]
impl<'a> From<String> for Cow<'a, str>
impl From<String> for Rc<str>
[src]
impl From<String> for Rc<str>
impl<'a> From<&'a String> for Cow<'a, str>
[src]
impl<'a> From<&'a String> for Cow<'a, str>
impl<'a, F> From<PinBox<F>> for LocalFutureObj<'a, ()> where
F: 'a + Future<Output = ()>,
[src]
impl<'a, F> From<PinBox<F>> for LocalFutureObj<'a, ()> where
F: 'a + Future<Output = ()>,
fn from(boxed: PinBox<F>) -> LocalFutureObj<'a, ()>
[src]
fn from(boxed: PinBox<F>) -> LocalFutureObj<'a, ()>
impl<'a, F> From<PinBox<F>> for FutureObj<'a, ()> where
F: 'a + Send + Future<Output = ()>,
[src]
impl<'a, F> From<PinBox<F>> for FutureObj<'a, ()> where
F: 'a + Send + Future<Output = ()>,
impl<T> From<Box<T>> for Arc<T> where
T: ?Sized,
[src]
impl<T> From<Box<T>> for Arc<T> where
T: ?Sized,
impl From<String> for Arc<str>
[src]
impl From<String> for Arc<str>
impl<'a, F> From<Box<F>> for LocalFutureObj<'a, ()> where
F: 'a + Future<Output = ()>,
[src]
impl<'a, F> From<Box<F>> for LocalFutureObj<'a, ()> where
F: 'a + Future<Output = ()>,
fn from(boxed: Box<F>) -> LocalFutureObj<'a, ()>
[src]
fn from(boxed: Box<F>) -> LocalFutureObj<'a, ()>
impl<'a, F> From<Box<F>> for FutureObj<'a, ()> where
F: 'a + Send + Future<Output = ()>,
[src]
impl<'a, F> From<Box<F>> for FutureObj<'a, ()> where
F: 'a + Send + Future<Output = ()>,
impl<'a, T> From<&'a Vec<T>> for Cow<'a, [T]> where
T: Clone,
[src]
impl<'a, T> From<&'a Vec<T>> for Cow<'a, [T]> where
T: Clone,
impl<T> From<Box<T>> for Rc<T> where
T: ?Sized,
[src]
impl<T> From<Box<T>> for Rc<T> where
T: ?Sized,
impl<T> From<Vec<T>> for Arc<[T]>
[src]
impl<T> From<Vec<T>> for Arc<[T]>
impl<'a> From<&'a str> for Rc<str>
[src]
impl<'a> From<&'a str> for Rc<str>
impl<'a, T> From<Vec<T>> for Cow<'a, [T]> where
T: Clone,
[src]
impl<'a, T> From<Vec<T>> for Cow<'a, [T]> where
T: Clone,
impl<'a, T> From<&'a [T]> for Rc<[T]> where
T: Clone,
[src]
impl<'a, T> From<&'a [T]> for Rc<[T]> where
T: Clone,
impl<'a> From<&'a str> for Cow<'a, str>
[src]
impl<'a> From<&'a str> for Cow<'a, str>
impl<T> From<Arc<T>> for Waker where
T: Wake + 'static,
[src]
impl<T> From<Arc<T>> for Waker where
T: Wake + 'static,
impl<T> From<T> for Rc<T>
[src]
impl<T> From<T> for Rc<T>
Implementors
impl From<LayoutErr> for CollectionAllocErr
[src]
impl From<LayoutErr> for CollectionAllocErr
fn from(LayoutErr) -> CollectionAllocErr
[src]
fn from(LayoutErr) -> CollectionAllocErr
impl From<AllocErr> for CollectionAllocErr
[src]
impl From<AllocErr> for CollectionAllocErr
fn from(AllocErr) -> CollectionAllocErr
[src]
fn from(AllocErr) -> CollectionAllocErr
impl From<Box<str>> for Box<[u8]>
[src]
impl From<Box<str>> for Box<[u8]>
impl From<Box<str>> for String
[src]
impl From<Box<str>> for String
impl From<String> for Box<Error + 'static>
[src]
impl From<String> for Box<Error + 'static>
impl From<String> for Box<str>
[src]
impl From<String> for Box<str>
impl From<String> for Box<Error + 'static + Sync + Send>
[src]
impl From<String> for Box<Error + 'static + Sync + Send>
impl From<String> for Vec<u8>
[src]
impl From<String> for Vec<u8>
impl From<CString> for Box<CStr>
[src]
impl From<CString> for Box<CStr>
impl From<CString> for Vec<u8>
[src]
impl From<CString> for Vec<u8>
impl From<OsString> for Box<OsStr>
[src]
impl From<OsString> for Box<OsStr>
impl From<PathBuf> for Box<Path>
[src]
impl From<PathBuf> for Box<Path>
impl<'a> From<&'a str> for CompleteStr<'a>
[src]
impl<'a> From<&'a str> for CompleteStr<'a>
impl<'a> From<&'a str> for Box<Error + 'static>
[src]
impl<'a> From<&'a str> for Box<Error + 'static>
impl<'a> From<&'a str> for Box<str>
[src]
impl<'a> From<&'a str> for Box<str>
impl<'a> From<&'a str> for String
[src]
impl<'a> From<&'a str> for String
impl<'a> From<&'a str> for Vec<u8>
[src]
impl<'a> From<&'a str> for Vec<u8>
impl<'a> From<&'a CStr> for Box<CStr>
[src]
impl<'a> From<&'a CStr> for Box<CStr>
impl<'a> From<&'a OsStr> for Box<OsStr>
[src]
impl<'a> From<&'a OsStr> for Box<OsStr>
impl<'a> From<&'a Path> for Box<Path>
[src]
impl<'a> From<&'a Path> for Box<Path>
impl<'a> From<Cow<'a, str>> for Box<Error + 'static>
[src]
impl<'a> From<Cow<'a, str>> for Box<Error + 'static>
impl<'a> From<Cow<'a, str>> for String
[src]
impl<'a> From<Cow<'a, str>> for String
impl<'a> From<&'a [u8]> for CompleteByteSlice<'a>
[src]
impl<'a> From<&'a [u8]> for CompleteByteSlice<'a>
impl<'a, 'b> From<&'b &'a str> for CompleteStr<'a>
[src]
impl<'a, 'b> From<&'b &'a str> for CompleteStr<'a>
impl<'a, 'b> From<&'b &'a [u8]> for CompleteByteSlice<'a>
[src]
impl<'a, 'b> From<&'b &'a [u8]> for CompleteByteSlice<'a>
impl<'a, 'b> From<&'b str> for Box<Error + 'a + Sync + Send>
[src]
impl<'a, 'b> From<&'b str> for Box<Error + 'a + Sync + Send>
impl<'a, 'b> From<Cow<'b, str>> for Box<Error + 'a + Sync + Send>
[src]
impl<'a, 'b> From<Cow<'b, str>> for Box<Error + 'a + Sync + Send>
impl<'a, E> From<E> for Box<Error + 'a> where
E: 'a + Error,
[src]
impl<'a, E> From<E> for Box<Error + 'a> where
E: 'a + Error,
impl<'a, E> From<E> for Box<Error + 'a + Sync + Send> where
E: 'a + Error + Send + Sync,
[src]
impl<'a, E> From<E> for Box<Error + 'a + Sync + Send> where
E: 'a + Error + Send + Sync,
impl<'a, T> From<&'a Option<T>> for Option<&'a T>
[src]
impl<'a, T> From<&'a Option<T>> for Option<&'a T>
impl<'a, T> From<&'a mut Option<T>> for Option<&'a mut T>
[src]
impl<'a, T> From<&'a mut Option<T>> for Option<&'a mut T>
impl<'a, T> From<Cow<'a, [T]>> for Vec<T> where
[T]: ToOwned,
<[T] as ToOwned>::Owned == Vec<T>,
[src]
impl<'a, T> From<Cow<'a, [T]>> for Vec<T> where
[T]: ToOwned,
<[T] as ToOwned>::Owned == Vec<T>,
impl<'a, T> From<&'a [T]> for Box<[T]> where
T: Copy,
[src]
impl<'a, T> From<&'a [T]> for Box<[T]> where
T: Copy,
impl<'a, T> From<&'a [T]> for Vec<T> where
T: Clone,
[src]
impl<'a, T> From<&'a [T]> for Vec<T> where
T: Clone,
impl<'a, T> From<&'a mut [T]> for Vec<T> where
T: Clone,
[src]
impl<'a, T> From<&'a mut [T]> for Vec<T> where
T: Clone,
impl<T> From<T> for T
[src]
impl<T> From<T> for T
impl<T> From<BinaryHeap<T>> for Vec<T>
[src]
impl<T> From<BinaryHeap<T>> for Vec<T>
impl<T> From<VecDeque<T>> for Vec<T>
[src]
impl<T> From<VecDeque<T>> for Vec<T>
impl<T> From<Box<[T]>> for Vec<T>
[src]
impl<T> From<Box<[T]>> for Vec<T>
impl<T> From<Vec<T>> for VecDeque<T>
[src]
impl<T> From<Vec<T>> for VecDeque<T>
impl<T> From<Vec<T>> for BinaryHeap<T> where
T: Ord,
[src]
impl<T> From<Vec<T>> for BinaryHeap<T> where
T: Ord,
fn from(vec: Vec<T>) -> BinaryHeap<T>
[src]
fn from(vec: Vec<T>) -> BinaryHeap<T>
impl<T> From<Vec<T>> for Box<[T]>
[src]
impl<T> From<Vec<T>> for Box<[T]>
impl<T> From<PinBox<T>> for Box<T> where
T: Unpin + ?Sized,
[src]
impl<T> From<PinBox<T>> for Box<T> where
T: Unpin + ?Sized,
impl<T> From<T> for Option<T>
[src]
impl<T> From<T> for Option<T>
impl<T> From<T> for Box<T>
[src]
impl<T> From<T> for Box<T>