Trait gstd::prelude::From

1.0.0 · source ·
pub trait From<T>: Sized {
    // Required method
    fn from(value: T) -> Self;
}
Expand description

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. The From trait is intended for perfect conversions. If the conversion can fail or is not perfect, use TryFrom.

§Generic Implementations

  • From<T> for U implies Into<U> for T
  • From is reflexive, which means that From<T> for T is implemented

§When to implement From

While there’s no technical restrictions on which conversions can be done using a From implementation, the general expectation is that the conversions should typically be restricted as follows:

  • The conversion is infallible: if the conversion can fail, use TryFrom instead; don’t provide a From impl that panics.

  • The conversion is lossless: semantically, it should not lose or discard information. For example, i32: From<u16> exists, where the original value can be recovered using u16: TryFrom<i32>. And String: From<&str> exists, where you can get something equivalent to the original value via Deref. But From cannot be used to convert from u32 to u16, since that cannot succeed in a lossless way. (There’s some wiggle room here for information not considered semantically relevant. For example, Box<[T]>: From<Vec<T>> exists even though it might not preserve capacity, like how two vectors can be equal despite differing capacities.)

  • The conversion is value-preserving: the conceptual kind and meaning of the resulting value is the same, even though the Rust type and technical representation might be different. For example -1_i8 as u8 is lossless, since as casting back can recover the original value, but that conversion is not available via From because -1 and 255 are different conceptual values (despite being identical bit patterns technically). But f32: From<i16> is available because 1_i16 and 1.0_f32 are conceptually the same real number (despite having very different bit patterns technically). String: From<char> is available because they’re both text, but String: From<u32> is not available, since 1 (a number) and "1" (text) are too different. (Converting values to text is instead covered by the Display trait.)

  • The conversion is obvious: it’s the only reasonable conversion between the two types. Otherwise it’s better to have it be a named method or constructor, like how str::as_bytes is a method and how integers have methods like u32::from_ne_bytes, u32::from_le_bytes, and u32::from_be_bytes, none of which are From implementations. Whereas there’s only one reasonable way to wrap an Ipv6Addr into an IpAddr, thus IpAddr: From<Ipv6Addr> exists.

§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 with From::from.

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§

source

fn from(value: T) -> Self

Converts to this type from the input type.

Object Safety§

This trait is not object safe.

Implementors§

§

impl From<&'static str> for Bytes

§

impl From<&'static str> for Error

§

impl From<&'static str> for U128

§

impl From<&'static str> for U256

§

impl From<&'static str> for U512

§

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

1.21.0 · source§

impl From<&str> for Arc<str>

1.21.0 · source§

impl From<&str> for Rc<str>

1.17.0 · source§

impl From<&str> for gstd::prelude::Box<str>

1.6.0 · source§

impl From<&str> for gstd::prelude::Box<dyn Error>

source§

impl From<&str> for String

source§

impl From<&str> for gstd::prelude::Vec<u8>

§

impl From<&str> for Vec<u8>

1.7.0 · source§

impl From<&CStr> for CString

1.24.0 · source§

impl From<&CStr> for Arc<CStr>

1.24.0 · source§

impl From<&CStr> for Rc<CStr>

1.17.0 · source§

impl From<&CStr> for gstd::prelude::Box<CStr>

§

impl From<&CStr> for Box<CStr>

source§

impl From<&StreamResult> for Result<MZStatus, MZError>

1.24.0 · source§

impl From<&OsStr> for Arc<OsStr>

1.24.0 · source§

impl From<&OsStr> for Rc<OsStr>

1.17.0 · source§

impl From<&OsStr> for gstd::prelude::Box<OsStr>

1.24.0 · source§

impl From<&Path> for Arc<Path>

1.24.0 · source§

impl From<&Path> for Rc<Path>

1.17.0 · source§

impl From<&Path> for gstd::prelude::Box<Path>

1.35.0 · source§

impl From<&String> for String

source§

impl From<&ChaCha8Rng> for ChaCha8Rng

source§

impl From<&ChaCha12Rng> for ChaCha12Rng

source§

impl From<&ChaCha20Rng> for ChaCha20Rng

1.44.0 · source§

impl From<&mut str> for String

§

impl From<ErrorReplyReason> for ReplyCode

§

impl From<ExecutionError> for ExtError

§

impl From<ExtError> for Error

§

impl From<MemoryError> for ExtError

§

impl From<MessageError> for ExtError

§

impl From<ReservationError> for ExtError

§

impl From<SimpleExecutionError> for ErrorReplyReason

§

impl From<SimpleExecutionError> for SignalCode

§

impl From<SimpleProgramCreationError> for ErrorReplyReason

§

impl From<SuccessReplyReason> for ReplyCode

1.45.0 · source§

impl From<Cow<'_, str>> for gstd::prelude::Box<str>

1.45.0 · source§

impl From<Cow<'_, CStr>> for gstd::prelude::Box<CStr>

1.45.0 · source§

impl From<Cow<'_, OsStr>> for gstd::prelude::Box<OsStr>

1.45.0 · source§

impl From<Cow<'_, Path>> for gstd::prelude::Box<Path>

source§

impl From<TryReserveErrorKind> for TryReserveError

1.36.0 · source§

impl From<Infallible> for TryFromSliceError

1.34.0 · source§

impl From<Infallible> for TryFromIntError

§

impl From<Result<u32, u32>> for ErrorWithHandle

§

impl From<Result<u32, u32>> for ErrorWithSignalCode

§

impl From<Result<u64, u32>> for ErrorWithGas

§

impl From<Result<(), u32>> for ErrorBytes

§

impl From<Result<[u8; 4], u32>> for ErrorWithReplyCode

1.14.0 · source§

impl From<ErrorKind> for std::io::error::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.

1.68.0 · source§

impl From<bool> for f32

1.68.0 · source§

impl From<bool> for f64

1.28.0 · source§

impl From<bool> for i8

1.28.0 · source§

impl From<bool> for i16

1.28.0 · source§

impl From<bool> for i32

1.28.0 · source§

impl From<bool> for i64

1.28.0 · source§

impl From<bool> for i128

1.28.0 · source§

impl From<bool> for isize

1.28.0 · source§

impl From<bool> for u8

1.28.0 · source§

impl From<bool> for u16

1.28.0 · source§

impl From<bool> for u32

1.28.0 · source§

impl From<bool> for u64

1.28.0 · source§

impl From<bool> for u128

1.28.0 · source§

impl From<bool> for usize

1.24.0 · source§

impl From<bool> for AtomicBool

1.13.0 · source§

impl From<char> for u32

1.51.0 · source§

impl From<char> for u64

1.51.0 · source§

impl From<char> for u128

1.46.0 · source§

impl From<char> for String

1.6.0 · source§

impl From<f32> for f64

1.6.0 · source§

impl From<i8> for f32

1.6.0 · source§

impl From<i8> for f64

1.5.0 · source§

impl From<i8> for i16

1.5.0 · source§

impl From<i8> for i32

1.5.0 · source§

impl From<i8> for i64

1.26.0 · source§

impl From<i8> for i128

1.5.0 · source§

impl From<i8> for isize

1.34.0 · source§

impl From<i8> for AtomicI8

§

impl From<i8> for U128

§

impl From<i8> for U256

§

impl From<i8> for U512

1.6.0 · source§

impl From<i16> for f32

1.6.0 · source§

impl From<i16> for f64

1.5.0 · source§

impl From<i16> for i32

1.5.0 · source§

impl From<i16> for i64

1.26.0 · source§

impl From<i16> for i128

1.26.0 · source§

impl From<i16> for isize

1.34.0 · source§

impl From<i16> for AtomicI16

§

impl From<i16> for U128

§

impl From<i16> for U256

§

impl From<i16> for U512

1.6.0 · source§

impl From<i32> for f64

1.5.0 · source§

impl From<i32> for i64

1.26.0 · source§

impl From<i32> for i128

1.34.0 · source§

impl From<i32> for AtomicI32

§

impl From<i32> for U128

§

impl From<i32> for U256

§

impl From<i32> for U512

1.26.0 · source§

impl From<i64> for i128

1.34.0 · source§

impl From<i64> for AtomicI64

§

impl From<i64> for U128

§

impl From<i64> for U256

§

impl From<i64> for U512

§

impl From<i128> for U128

§

impl From<i128> for U256

§

impl From<i128> for U512

1.23.0 · source§

impl From<isize> for AtomicIsize

§

impl From<isize> for U128

§

impl From<isize> for U256

§

impl From<isize> for U512

1.34.0 · source§

impl From<!> for Infallible

source§

impl From<!> for TryFromIntError

1.13.0 · source§

impl From<u8> for char

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.

1.6.0 · source§

impl From<u8> for f32

1.6.0 · source§

impl From<u8> for f64

1.5.0 · source§

impl From<u8> for i16

1.5.0 · source§

impl From<u8> for i32

1.5.0 · source§

impl From<u8> for i64

1.26.0 · source§

impl From<u8> for i128

1.26.0 · source§

impl From<u8> for isize

1.5.0 · source§

impl From<u8> for u16

1.5.0 · source§

impl From<u8> for u32

1.5.0 · source§

impl From<u8> for u64

1.26.0 · source§

impl From<u8> for u128

1.5.0 · source§

impl From<u8> for usize

1.34.0 · source§

impl From<u8> for AtomicU8

1.61.0 · source§

impl From<u8> for ExitCode

§

impl From<u8> for U128

§

impl From<u8> for U256

§

impl From<u8> for U512

1.6.0 · source§

impl From<u16> for f32

1.6.0 · source§

impl From<u16> for f64

1.5.0 · source§

impl From<u16> for i32

1.5.0 · source§

impl From<u16> for i64

1.26.0 · source§

impl From<u16> for i128

1.5.0 · source§

impl From<u16> for u32

1.5.0 · source§

impl From<u16> for u64

1.26.0 · source§

impl From<u16> for u128

1.26.0 · source§

impl From<u16> for usize

1.34.0 · source§

impl From<u16> for AtomicU16

§

impl From<u16> for U128

§

impl From<u16> for U256

§

impl From<u16> for U512

1.6.0 · source§

impl From<u32> for f64

1.5.0 · source§

impl From<u32> for i64

1.26.0 · source§

impl From<u32> for i128

1.5.0 · source§

impl From<u32> for u64

1.26.0 · source§

impl From<u32> for u128

1.1.0 · source§

impl From<u32> for Ipv4Addr

1.34.0 · source§

impl From<u32> for AtomicU32

§

impl From<u32> for U128

§

impl From<u32> for U256

§

impl From<u32> for U512

1.26.0 · source§

impl From<u64> for i128

1.26.0 · source§

impl From<u64> for u128

source§

impl From<u64> for gstd::ActorId

1.34.0 · source§

impl From<u64> for AtomicU64

§

impl From<u64> for ActorId

§

impl From<u64> for U128

§

impl From<u64> for U256

§

impl From<u64> for U512

1.26.0 · source§

impl From<u128> for Ipv6Addr

§

impl From<u128> for U128

§

impl From<u128> for U256

§

impl From<u128> for U512

§

impl From<()> for ExtError

§

impl From<()> for ReplyCode

§

impl From<()> for SignalCode

1.23.0 · source§

impl From<usize> for AtomicUsize

§

impl From<usize> for U128

§

impl From<usize> for U256

§

impl From<usize> for U512

§

impl From<SyscallError> for Result<(), Error>

source§

impl From<MessageHandle> for MessageHandle

source§

impl From<ActorId> for ActorId

source§

impl From<ActorId> for [u8; 32]

source§

impl From<CodeId> for CodeId

source§

impl From<CodeId> for [u8; 32]

source§

impl From<MessageId> for MessageId

source§

impl From<MessageId> for [u8; 32]

source§

impl From<Reservation> for gstd::ReservationId

source§

impl From<ReservationId> for ReservationId

1.24.0 · source§

impl From<CString> for Arc<CStr>

1.24.0 · source§

impl From<CString> for Rc<CStr>

1.20.0 · source§

impl From<CString> for gstd::prelude::Box<CStr>

1.7.0 · source§

impl From<CString> for gstd::prelude::Vec<u8>

source§

impl From<NulError> for std::io::error::Error

1.62.0 · source§

impl From<Arc<str>> for Arc<[u8]>

source§

impl From<LayoutError> for TryReserveErrorKind

source§

impl From<__m128> for Simd<f32, 4>

source§

impl From<__m128d> for Simd<f64, 2>

source§

impl From<__m128i> for Simd<i8, 16>

source§

impl From<__m128i> for Simd<i16, 8>

source§

impl From<__m128i> for Simd<i32, 4>

source§

impl From<__m128i> for Simd<i64, 2>

source§

impl From<__m128i> for Simd<isize, 2>

source§

impl From<__m128i> for Simd<u8, 16>

source§

impl From<__m128i> for Simd<u16, 8>

source§

impl From<__m128i> for Simd<u32, 4>

source§

impl From<__m128i> for Simd<u64, 2>

source§

impl From<__m128i> for Simd<usize, 2>

source§

impl From<__m256> for Simd<f32, 8>

source§

impl From<__m256d> for Simd<f64, 4>

source§

impl From<__m256i> for Simd<i8, 32>

source§

impl From<__m256i> for Simd<i16, 16>

source§

impl From<__m256i> for Simd<i32, 8>

source§

impl From<__m256i> for Simd<i64, 4>

source§

impl From<__m256i> for Simd<isize, 4>

source§

impl From<__m256i> for Simd<u8, 32>

source§

impl From<__m256i> for Simd<u16, 16>

source§

impl From<__m256i> for Simd<u32, 8>

source§

impl From<__m256i> for Simd<u64, 4>

source§

impl From<__m256i> for Simd<usize, 4>

source§

impl From<__m512> for Simd<f32, 16>

source§

impl From<__m512d> for Simd<f64, 8>

source§

impl From<__m512i> for Simd<i8, 64>

source§

impl From<__m512i> for Simd<i16, 32>

source§

impl From<__m512i> for Simd<i32, 16>

source§

impl From<__m512i> for Simd<i64, 8>

source§

impl From<__m512i> for Simd<isize, 8>

source§

impl From<__m512i> for Simd<u8, 64>

source§

impl From<__m512i> for Simd<u16, 32>

source§

impl From<__m512i> for Simd<u32, 16>

source§

impl From<__m512i> for Simd<u64, 8>

source§

impl From<__m512i> for Simd<usize, 8>

source§

impl From<Simd<f32, 4>> for __m128

source§

impl From<Simd<f32, 8>> for __m256

source§

impl From<Simd<f32, 16>> for __m512

source§

impl From<Simd<f64, 2>> for __m128d

source§

impl From<Simd<f64, 4>> for __m256d

source§

impl From<Simd<f64, 8>> for __m512d

source§

impl From<Simd<i8, 16>> for __m128i

source§

impl From<Simd<i8, 32>> for __m256i

source§

impl From<Simd<i8, 64>> for __m512i

source§

impl From<Simd<i16, 8>> for __m128i

source§

impl From<Simd<i16, 16>> for __m256i

source§

impl From<Simd<i16, 32>> for __m512i

source§

impl From<Simd<i32, 4>> for __m128i

source§

impl From<Simd<i32, 8>> for __m256i

source§

impl From<Simd<i32, 16>> for __m512i

source§

impl From<Simd<i64, 2>> for __m128i

source§

impl From<Simd<i64, 4>> for __m256i

source§

impl From<Simd<i64, 8>> for __m512i

source§

impl From<Simd<isize, 2>> for __m128i

source§

impl From<Simd<isize, 4>> for __m256i

source§

impl From<Simd<isize, 8>> for __m512i

source§

impl From<Simd<u8, 16>> for __m128i

source§

impl From<Simd<u8, 32>> for __m256i

source§

impl From<Simd<u8, 64>> for __m512i

source§

impl From<Simd<u16, 8>> for __m128i

source§

impl From<Simd<u16, 16>> for __m256i

source§

impl From<Simd<u16, 32>> for __m512i

source§

impl From<Simd<u32, 4>> for __m128i

source§

impl From<Simd<u32, 8>> for __m256i

source§

impl From<Simd<u32, 16>> for __m512i

source§

impl From<Simd<u64, 2>> for __m128i

source§

impl From<Simd<u64, 4>> for __m256i

source§

impl From<Simd<u64, 8>> for __m512i

source§

impl From<Simd<usize, 2>> for __m128i

source§

impl From<Simd<usize, 4>> for __m256i

source§

impl From<Simd<usize, 8>> for __m512i

1.16.0 · source§

impl From<Ipv4Addr> for IpAddr

1.1.0 · source§

impl From<Ipv4Addr> for u32

1.16.0 · source§

impl From<Ipv6Addr> for IpAddr

1.26.0 · source§

impl From<Ipv6Addr> for u128

1.16.0 · source§

impl From<SocketAddrV4> for SocketAddr

1.16.0 · source§

impl From<SocketAddrV6> for SocketAddr

source§

impl From<StreamResult> for Result<MZStatus, MZError>

1.24.0 · source§

impl From<OsString> for Arc<OsStr>

source§

impl From<OsString> for PathBuf

1.24.0 · source§

impl From<OsString> for Rc<OsStr>

1.20.0 · source§

impl From<OsString> for gstd::prelude::Box<OsStr>

1.63.0 · source§

impl From<File> for OwnedFd

1.20.0 · source§

impl From<File> for Stdio

§

impl From<Error> for Error

1.74.0 · source§

impl From<Stderr> for Stdio

1.74.0 · source§

impl From<Stdout> for Stdio

1.63.0 · source§

impl From<TcpListener> for OwnedFd

1.63.0 · source§

impl From<TcpStream> for OwnedFd

1.63.0 · source§

impl From<UdpSocket> for OwnedFd

1.63.0 · source§

impl From<OwnedFd> for File

1.63.0 · source§

impl From<OwnedFd> for TcpListener

1.63.0 · source§

impl From<OwnedFd> for TcpStream

1.63.0 · source§

impl From<OwnedFd> for UdpSocket

source§

impl From<OwnedFd> for PidFd

1.63.0 · source§

impl From<OwnedFd> for UnixDatagram

1.63.0 · source§

impl From<OwnedFd> for UnixListener

1.63.0 · source§

impl From<OwnedFd> for UnixStream

1.74.0 · source§

impl From<OwnedFd> for ChildStderr

Create a ChildStderr from the provided OwnedFd.

The provided file descriptor must point to a pipe with the CLOEXEC flag set.

1.74.0 · source§

impl From<OwnedFd> for ChildStdin

Create a ChildStdin from the provided OwnedFd.

The provided file descriptor must point to a pipe with the CLOEXEC flag set.

1.74.0 · source§

impl From<OwnedFd> for ChildStdout

Create a ChildStdout from the provided OwnedFd.

The provided file descriptor must point to a pipe with the CLOEXEC flag set.

1.63.0 · source§

impl From<OwnedFd> for Stdio

source§

impl From<PidFd> for OwnedFd

1.63.0 · source§

impl From<UnixDatagram> for OwnedFd

1.63.0 · source§

impl From<UnixListener> for OwnedFd

1.63.0 · source§

impl From<UnixStream> for OwnedFd

1.24.0 · source§

impl From<PathBuf> for Arc<Path>

1.14.0 · source§

impl From<PathBuf> for OsString

1.24.0 · source§

impl From<PathBuf> for Rc<Path>

1.20.0 · source§

impl From<PathBuf> for gstd::prelude::Box<Path>

1.63.0 · source§

impl From<ChildStderr> for OwnedFd

1.20.0 · source§

impl From<ChildStderr> for Stdio

1.63.0 · source§

impl From<ChildStdin> for OwnedFd

1.20.0 · source§

impl From<ChildStdin> for Stdio

1.63.0 · source§

impl From<ChildStdout> for OwnedFd

1.20.0 · source§

impl From<ChildStdout> for Stdio

source§

impl From<ExitStatusError> for ExitStatus

1.24.0 · source§

impl From<RecvError> for RecvTimeoutError

1.24.0 · source§

impl From<RecvError> for TryRecvError

source§

impl From<Error> for std::io::error::Error

source§

impl From<Error> for rand_core::error::Error

source§

impl From<ChaCha8Core> for ChaCha8Rng

source§

impl From<ChaCha12Core> for ChaCha12Rng

source§

impl From<ChaCha20Core> for ChaCha20Rng

source§

impl From<Error> for std::io::error::Error

1.31.0 · source§

impl From<NonZeroI8> for i8

1.41.0 · source§

impl From<NonZeroI8> for NonZeroI16

1.41.0 · source§

impl From<NonZeroI8> for NonZeroI32

1.41.0 · source§

impl From<NonZeroI8> for NonZeroI64

1.41.0 · source§

impl From<NonZeroI8> for NonZeroI128

1.41.0 · source§

impl From<NonZeroI8> for NonZeroIsize

1.31.0 · source§

impl From<NonZeroI16> for i16

1.41.0 · source§

impl From<NonZeroI16> for NonZeroI32

1.41.0 · source§

impl From<NonZeroI16> for NonZeroI64

1.41.0 · source§

impl From<NonZeroI16> for NonZeroI128

1.41.0 · source§

impl From<NonZeroI16> for NonZeroIsize

1.31.0 · source§

impl From<NonZeroI32> for i32

1.41.0 · source§

impl From<NonZeroI32> for NonZeroI64

1.41.0 · source§

impl From<NonZeroI32> for NonZeroI128

1.31.0 · source§

impl From<NonZeroI64> for i64

1.41.0 · source§

impl From<NonZeroI64> for NonZeroI128

1.31.0 · source§

impl From<NonZeroI128> for i128

1.31.0 · source§

impl From<NonZeroIsize> for isize

1.31.0 · source§

impl From<NonZeroU8> for u8

1.41.0 · source§

impl From<NonZeroU8> for NonZeroI16

1.41.0 · source§

impl From<NonZeroU8> for NonZeroI32

1.41.0 · source§

impl From<NonZeroU8> for NonZeroI64

1.41.0 · source§

impl From<NonZeroU8> for NonZeroI128

1.41.0 · source§

impl From<NonZeroU8> for NonZeroIsize

1.41.0 · source§

impl From<NonZeroU8> for NonZeroU16

1.41.0 · source§

impl From<NonZeroU8> for NonZeroU32

1.41.0 · source§

impl From<NonZeroU8> for NonZeroU64

1.41.0 · source§

impl From<NonZeroU8> for NonZeroU128

1.41.0 · source§

impl From<NonZeroU8> for NonZeroUsize

1.31.0 · source§

impl From<NonZeroU16> for u16

1.41.0 · source§

impl From<NonZeroU16> for NonZeroI32

1.41.0 · source§

impl From<NonZeroU16> for NonZeroI64

1.41.0 · source§

impl From<NonZeroU16> for NonZeroI128

1.41.0 · source§

impl From<NonZeroU16> for NonZeroU32

1.41.0 · source§

impl From<NonZeroU16> for NonZeroU64

1.41.0 · source§

impl From<NonZeroU16> for NonZeroU128

1.41.0 · source§

impl From<NonZeroU16> for NonZeroUsize

1.31.0 · source§

impl From<NonZeroU32> for u32

source§

impl From<NonZeroU32> for getrandom::error::Error

source§

impl From<NonZeroU32> for rand_core::error::Error

1.41.0 · source§

impl From<NonZeroU32> for NonZeroI64

1.41.0 · source§

impl From<NonZeroU32> for NonZeroI128

1.41.0 · source§

impl From<NonZeroU32> for NonZeroU64

1.41.0 · source§

impl From<NonZeroU32> for NonZeroU128

1.31.0 · source§

impl From<NonZeroU64> for u64

1.41.0 · source§

impl From<NonZeroU64> for NonZeroI128

1.41.0 · source§

impl From<NonZeroU64> for NonZeroU128

1.31.0 · source§

impl From<NonZeroU128> for u128

1.31.0 · source§

impl From<NonZeroUsize> for usize

source§

impl From<Alignment> for usize

source§

impl From<Alignment> for NonZeroUsize

1.62.0 · source§

impl From<Rc<str>> for Rc<[u8]>

1.18.0 · source§

impl From<Box<str>> for String

1.18.0 · source§

impl From<Box<CStr>> for CString

1.18.0 · source§

impl From<Box<OsStr>> for OsString

1.18.0 · source§

impl From<Box<Path>> for PathBuf

§

impl From<Box<[u8]>> for Bytes

1.21.0 · source§

impl From<String> for Arc<str>

source§

impl From<String> for OsString

source§

impl From<String> for PathBuf

1.21.0 · source§

impl From<String> for Rc<str>

1.20.0 · source§

impl From<String> for gstd::prelude::Box<str>

source§

impl From<String> for gstd::prelude::Box<dyn Error + Send + Sync>

1.6.0 · source§

impl From<String> for gstd::prelude::Box<dyn Error>

1.14.0 · source§

impl From<String> for gstd::prelude::Vec<u8>

§

impl From<String> for Bytes

source§

impl From<Vec<u8>> for ErrorReplyPayload

§

impl From<Vec<u8>> for Bytes

source§

impl From<Vec<u32>> for IndexVec

source§

impl From<Vec<usize>> for IndexVec

1.43.0 · source§

impl From<Vec<NonZeroU8>> for CString

source§

impl From<ActorId> for gstd::ActorId

§

impl From<Bytes> for gstd::prelude::Vec<u8>

§

impl From<BytesMut> for gstd::prelude::Vec<u8>

§

impl From<BytesMut> for Bytes

source§

impl From<CodeId> for gstd::CodeId

§

impl From<Compact<u8>> for u8

§

impl From<Compact<u16>> for u16

§

impl From<Compact<u32>> for u32

§

impl From<Compact<u64>> for u64

§

impl From<Compact<u128>> for u128

§

impl From<Compact<()>> for ()

source§

impl From<Error> for gstd::errors::Error

§

impl From<FromDecStrErr> for FromStrRadixErr

§

impl From<FromHexError> for FromStrRadixErr

§

impl From<H128> for [u8; 16]

§

impl From<H160> for H256

§

impl From<H160> for [u8; 20]

source§

impl From<H256> for gstd::ActorId

source§

impl From<H256> for gstd::CodeId

source§

impl From<H256> for gstd::MessageId

§

impl From<H256> for H160

§

impl From<H256> for [u8; 32]

§

impl From<H384> for [u8; 48]

§

impl From<H512> for [u8; 64]

§

impl From<H768> for [u8; 96]

source§

impl From<MessageHandle> for gstd::msg::MessageHandle

source§

impl From<MessageId> for gstd::MessageId

§

impl From<Registry> for PortableRegistry

source§

impl From<ReservationId> for gstd::ReservationId

§

impl From<U128> for U256

§

impl From<U128> for U512

§

impl From<U128> for [u8; 16]

§

impl From<U256> for U512

§

impl From<U256> for [u8; 32]

§

impl From<U512> for [u8; 64]

1.17.0 · source§

impl From<[u8; 4]> for IpAddr

1.9.0 · source§

impl From<[u8; 4]> for Ipv4Addr

1.17.0 · source§

impl From<[u8; 16]> for IpAddr

1.9.0 · source§

impl From<[u8; 16]> for Ipv6Addr

§

impl From<[u8; 16]> for H128

§

impl From<[u8; 16]> for U128

§

impl From<[u8; 20]> for H160

source§

impl From<[u8; 32]> for gstd::ActorId

source§

impl From<[u8; 32]> for gstd::CodeId

source§

impl From<[u8; 32]> for gstd::MessageId

§

impl From<[u8; 32]> for CodeId

§

impl From<[u8; 32]> for H256

§

impl From<[u8; 32]> for ReservationId

§

impl From<[u8; 32]> for U256

§

impl From<[u8; 48]> for H384

§

impl From<[u8; 64]> for H512

§

impl From<[u8; 64]> for U512

§

impl From<[u8; 96]> for H768

1.17.0 · source§

impl From<[u16; 8]> for IpAddr

1.16.0 · source§

impl From<[u16; 8]> for Ipv6Addr

§

impl From<[u32; 4]> for vec128_storage

§

impl From<[u64; 4]> for vec256_storage

§

impl From<vec128_storage> for [u32; 4]

§

impl From<vec128_storage> for [u64; 2]

§

impl From<vec128_storage> for [u128; 1]

§

impl From<vec256_storage> for [u32; 8]

§

impl From<vec256_storage> for [u64; 4]

§

impl From<vec256_storage> for [u128; 2]

§

impl From<vec512_storage> for [u32; 16]

§

impl From<vec512_storage> for [u64; 8]

§

impl From<vec512_storage> for [u128; 4]

source§

impl<'a> From<&'a str> for Cow<'a, str>

§

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

1.28.0 · source§

impl<'a> From<&'a CStr> for Cow<'a, CStr>

1.28.0 · source§

impl<'a> From<&'a CString> for Cow<'a, CStr>

1.28.0 · source§

impl<'a> From<&'a OsStr> for Cow<'a, OsStr>

1.28.0 · source§

impl<'a> From<&'a OsString> for Cow<'a, OsStr>

1.6.0 · source§

impl<'a> From<&'a Path> for Cow<'a, Path>

1.28.0 · source§

impl<'a> From<&'a PathBuf> for Cow<'a, Path>

1.28.0 · source§

impl<'a> From<&'a String> for Cow<'a, str>

§

impl<'a> From<&'a U128> for U128

§

impl<'a> From<&'a U256> for U256

§

impl<'a> From<&'a U256> for U512

§

impl<'a> From<&'a U512> for U512

§

impl<'a> From<&'a [u8; 16]> for H128

§

impl<'a> From<&'a [u8; 16]> for U128

§

impl<'a> From<&'a [u8; 20]> for H160

§

impl<'a> From<&'a [u8; 32]> for H256

§

impl<'a> From<&'a [u8; 32]> for U256

§

impl<'a> From<&'a [u8; 48]> for H384

§

impl<'a> From<&'a [u8; 64]> for H512

§

impl<'a> From<&'a [u8; 64]> for U512

§

impl<'a> From<&'a [u8; 96]> for H768

§

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

§

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

§

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

§

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

§

impl<'a> From<&'a mut [u8; 16]> for H128

§

impl<'a> From<&'a mut [u8; 20]> for H160

§

impl<'a> From<&'a mut [u8; 32]> for H256

§

impl<'a> From<&'a mut [u8; 48]> for H384

§

impl<'a> From<&'a mut [u8; 64]> for H512

§

impl<'a> From<&'a mut [u8; 96]> for H768

§

impl<'a> From<&'a vec128_storage> for &'a [u32; 4]

source§

impl<'a> From<&str> for gstd::prelude::Box<dyn Error + Send + Sync + 'a>

1.22.0 · source§

impl<'a> From<Cow<'a, str>> for gstd::prelude::Box<dyn Error>

1.14.0 · source§

impl<'a> From<Cow<'a, str>> for String

1.28.0 · source§

impl<'a> From<Cow<'a, CStr>> for CString

1.28.0 · source§

impl<'a> From<Cow<'a, OsStr>> for OsString

1.28.0 · source§

impl<'a> From<Cow<'a, Path>> for PathBuf

1.28.0 · source§

impl<'a> From<CString> for Cow<'a, CStr>

1.28.0 · source§

impl<'a> From<OsString> for Cow<'a, OsStr>

1.6.0 · source§

impl<'a> From<PathBuf> for Cow<'a, Path>

§

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

§

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

§

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

§

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

source§

impl<'a> From<String> for Cow<'a, str>

1.22.0 · source§

impl<'a, 'b> From<Cow<'b, str>> for gstd::prelude::Box<dyn Error + Send + Sync + 'a>

1.45.0 · source§

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

1.45.0 · source§

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

source§

impl<'a, E> From<E> for gstd::prelude::Box<dyn Error + 'a>
where E: Error + 'a,

source§

impl<'a, E> From<E> for gstd::prelude::Box<dyn Error + Send + Sync + 'a>
where E: Error + Send + Sync + 'a,

§

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

§

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

§

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

§

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

1.30.0 · source§

impl<'a, T> From<&'a Option<T>> for Option<&'a T>

1.8.0 · source§

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

1.28.0 · source§

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

1.30.0 · source§

impl<'a, T> From<&'a mut Option<T>> for Option<&'a mut T>

1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for gstd::prelude::Vec<T>
where [T]: ToOwned<Owned = Vec<T>>,

§

impl<'a, T> From<&'a T> for Compact<T>
where T: Copy,

§

impl<'a, T> From<&'a T> for CompactRef<'a, T>

§

impl<'a, T> From<&'a T> for Ptr<'a, T>
where T: 'a + ?Sized,

1.8.0 · source§

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

§

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

§

impl<'a, T, O> From<Cow<'a, BitSlice<T, O>>> for BitBox<T, O>
where T: BitStore, O: BitOrder,

§

impl<'a, T, O> From<Cow<'a, BitSlice<T, O>>> for BitVec<T, O>
where O: BitOrder, T: 'a + BitStore,

§

impl<'a, T, U> From<&'a T> for Ref<'a, T, U>
where T: EncodeLike<U>, U: Encode,

source§

impl<'data> From<&'data mut [u8]> for BorrowedBuf<'data>

Create a new BorrowedBuf from a fully initialized slice.

source§

impl<'data> From<&'data mut [MaybeUninit<u8>]> for BorrowedBuf<'data>

Create a new BorrowedBuf from an uninitialized buffer.

Use set_init if part of the buffer is known to be already initialized.

§

impl<A> From<&str> for Box<str, A>
where A: Allocator + Default,

1.19.0 · source§

impl<A> From<Box<str, A>> for gstd::prelude::Box<[u8], A>
where A: Allocator,

§

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

§

impl<A, O> From<A> for BitArray<A, O>
where A: BitViewSized, O: BitOrder,

§

impl<A, O> From<BitArray<A, O>> for BitBox<<A as BitView>::Store, O>
where A: BitViewSized, O: BitOrder,

§

impl<A, O> From<BitArray<A, O>> for BitVec<<A as BitView>::Store, O>
where O: BitOrder, A: BitViewSized,

source§

impl<E> From<E> for Report<E>
where E: Error,

§

impl<F> From<TypeDefArray<F>> for Type<F>
where F: Form,

§

impl<F> From<TypeDefArray<F>> for TypeDef<F>
where F: Form,

§

impl<F> From<TypeDefBitSequence<F>> for Type<F>
where F: Form,

§

impl<F> From<TypeDefBitSequence<F>> for TypeDef<F>
where F: Form,

§

impl<F> From<TypeDefCompact<F>> for Type<F>
where F: Form,

§

impl<F> From<TypeDefCompact<F>> for TypeDef<F>
where F: Form,

§

impl<F> From<TypeDefComposite<F>> for TypeDef<F>
where F: Form,

§

impl<F> From<TypeDefPrimitive> for Type<F>
where F: Form,

§

impl<F> From<TypeDefPrimitive> for TypeDef<F>
where F: Form,

§

impl<F> From<TypeDefSequence<F>> for Type<F>
where F: Form,

§

impl<F> From<TypeDefSequence<F>> for TypeDef<F>
where F: Form,

§

impl<F> From<TypeDefTuple<F>> for Type<F>
where F: Form,

§

impl<F> From<TypeDefTuple<F>> for TypeDef<F>
where F: Form,

§

impl<F> From<TypeDefVariant<F>> for TypeDef<F>
where F: Form,

1.17.0 · source§

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

§

impl<K, V> From<HashMap<K, V, RandomState>> for AHashMap<K, V>

§

impl<K, V, A, const N: usize> From<[(K, V); N]> for gstd::prelude::collections::HashMap<K, V, BuildHasherDefault<AHasher>, A>
where K: Eq + Hash, A: Default + Allocator,

1.56.0 · source§

impl<K, V, const N: usize> From<[(K, V); N]> for BTreeMap<K, V>
where K: Ord,

1.56.0 · source§

impl<K, V, const N: usize> From<[(K, V); N]> for std::collections::hash::map::HashMap<K, V>
where K: Eq + Hash,

§

impl<K, V, const N: usize> From<[(K, V); N]> for AHashMap<K, V>
where K: Eq + Hash,

§

impl<M, T, O> From<Range<BitPtr<M, T, O>>> for BitPtrRange<M, T, O>
where M: Mutability, T: BitStore, O: BitOrder,

§

impl<M, T, O> From<BitPtrRange<M, T, O>> for Range<BitPtr<M, T, O>>
where M: Mutability, T: BitStore, O: BitOrder,

§

impl<NI> From<u32x4x2_avx2<NI>> for vec256_storage

§

impl<NI> From<x2<u32x4x2_avx2<NI>, G0>> for vec512_storage
where NI: Copy,

§

impl<S3, S4, NI> From<u32x4_sse2<S3, S4, NI>> for vec128_storage

§

impl<S3, S4, NI> From<u64x2_sse2<S3, S4, NI>> for vec128_storage

§

impl<S3, S4, NI> From<u128x1_sse2<S3, S4, NI>> for vec128_storage

§

impl<T1, T2> From<Result<(T1, T2), u32>> for ErrorWithTwoHashes
where T1: Into<[u8; 32]>, T2: Into<[u8; 32]>,

1.21.0 · source§

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

1.21.0 · source§

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

1.17.0 · source§

impl<T> From<&[T]> for gstd::prelude::Box<[T]>
where T: Clone,

source§

impl<T> From<&[T]> for gstd::prelude::Vec<T>
where T: Clone,

§

impl<T> From<&[T]> for Vec<T>
where T: Clone,

1.19.0 · source§

impl<T> From<&mut [T]> for gstd::prelude::Vec<T>
where T: Clone,

§

impl<T> From<&mut [T]> for Vec<T>
where T: Clone,

§

impl<T> From<(<T as Form>::String, Option<<T as Form>::Type>)> for TypeParameter<T>
where T: Form,

§

impl<T> From<(Path<T>, Vec<TypeParameter<T>>, TypeDef<T>, Vec<<T as Form>::String>)> for Type<T>
where T: Form,

1.45.0 · source§

impl<T> From<Cow<'_, [T]>> for gstd::prelude::Box<[T]>
where T: Clone,

§

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

§

impl<T> From<Result<T, u32>> for ErrorWithHash
where T: Into<[u8; 32]>,

1.71.0 · source§

impl<T> From<[T; 1]> for (T,)

1.71.0 · source§

impl<T> From<[T; 2]> for (T, T)

1.71.0 · source§

impl<T> From<[T; 3]> for (T, T, T)

1.71.0 · source§

impl<T> From<[T; 4]> for (T, T, T, T)

1.71.0 · source§

impl<T> From<[T; 5]> for (T, T, T, T, T)

1.71.0 · source§

impl<T> From<[T; 6]> for (T, T, T, T, T, T)

1.71.0 · source§

impl<T> From<[T; 7]> for (T, T, T, T, T, T, T)

1.71.0 · source§

impl<T> From<[T; 8]> for (T, T, T, T, T, T, T, T)

1.71.0 · source§

impl<T> From<[T; 9]> for (T, T, T, T, T, T, T, T, T)

1.71.0 · source§

impl<T> From<[T; 10]> for (T, T, T, T, T, T, T, T, T, T)

1.71.0 · source§

impl<T> From<[T; 11]> for (T, T, T, T, T, T, T, T, T, T, T)

1.71.0 · source§

impl<T> From<[T; 12]> for (T, T, T, T, T, T, T, T, T, T, T, T)

1.34.0 · source§

impl<T> From<!> for T

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.

1.23.0 · source§

impl<T> From<*mut T> for AtomicPtr<T>

source§

impl<T> From<&T> for OsString
where T: AsRef<OsStr> + ?Sized,

source§

impl<T> From<&T> for PathBuf
where T: AsRef<OsStr> + ?Sized,

1.25.0 · source§

impl<T> From<&T> for NonNull<T>
where T: ?Sized,

§

impl<T> From<&T> for Address<Const, T>
where T: ?Sized,

1.25.0 · source§

impl<T> From<&mut T> for NonNull<T>
where T: ?Sized,

§

impl<T> From<&mut T> for Address<Mut, T>
where T: ?Sized,

1.71.0 · source§

impl<T> From<(T, T)> for [T; 2]

1.71.0 · source§

impl<T> From<(T, T, T)> for [T; 3]

1.71.0 · source§

impl<T> From<(T, T, T, T)> for [T; 4]

1.71.0 · source§

impl<T> From<(T, T, T, T, T)> for [T; 5]

1.71.0 · source§

impl<T> From<(T, T, T, T, T, T)> for [T; 6]

1.71.0 · source§

impl<T> From<(T, T, T, T, T, T, T)> for [T; 7]

1.71.0 · source§

impl<T> From<(T, T, T, T, T, T, T, T)> for [T; 8]

1.71.0 · source§

impl<T> From<(T, T, T, T, T, T, T, T, T)> for [T; 9]

1.71.0 · source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T)> for [T; 10]

1.71.0 · source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T)> for [T; 11]

1.71.0 · source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T)> for [T; 12]

1.71.0 · source§

impl<T> From<(T,)> for [T; 1]

§

impl<T> From<u32> for UntrackedSymbol<T>

§

impl<T> From<HashSet<T, RandomState>> for AHashSet<T>

1.24.0 · source§

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

source§

impl<T> From<PoisonError<T>> for TryLockError<T>

§

impl<T> From<Vec<Field<T>>> for TypeDefComposite<T>
where T: Form,

§

impl<T> From<Vec<Variant<T>>> for TypeDefVariant<T>
where T: Form,

§

impl<T> From<BitPtrError<T>> for BitSpanError<T>
where T: BitStore,

§

impl<T> From<MisalignError<T>> for BitPtrError<T>
where T: BitStore,

§

impl<T> From<MisalignError<T>> for BitSpanError<T>
where T: BitStore,

§

impl<T> From<NullPtrError> for BitPtrError<T>
where T: BitStore,

1.12.0 · source§

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

1.36.0 · source§

impl<T> From<T> for Poll<T>

source§

impl<T> From<T> for gstd::sync::Mutex<T>

source§

impl<T> From<T> for gstd::sync::RwLock<T>

1.12.0 · source§

impl<T> From<T> for Cell<T>

1.70.0 · source§

impl<T> From<T> for gstd::prelude::cell::OnceCell<T>

1.12.0 · source§

impl<T> From<T> for RefCell<T>

source§

impl<T> From<T> for SyncUnsafeCell<T>

1.12.0 · source§

impl<T> From<T> for UnsafeCell<T>

1.6.0 · source§

impl<T> From<T> for Arc<T>

source§

impl<T> From<T> for Exclusive<T>

1.24.0 · source§

impl<T> From<T> for std::sync::mutex::Mutex<T>

1.70.0 · source§

impl<T> From<T> for OnceLock<T>

1.24.0 · source§

impl<T> From<T> for std::sync::rwlock::RwLock<T>

1.6.0 · source§

impl<T> From<T> for Rc<T>

1.6.0 · source§

impl<T> From<T> for gstd::prelude::Box<T>

§

impl<T> From<T> for Box<T>

§

impl<T> From<T> for Compact<T>

§

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

§

impl<T> From<T> for OnceCell<T>

§

impl<T> From<T> for OnceCell<T>

source§

impl<T> From<T> for T

§

impl<T, A> From<&[T]> for Box<[T], A>
where T: Copy, A: Allocator + Default,

1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for gstd::prelude::Vec<T, A>
where A: Allocator,

1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for gstd::prelude::Vec<T, A>
where A: Allocator,

1.18.0 · source§

impl<T, A> From<Box<[T], A>> for gstd::prelude::Vec<T, A>
where A: Allocator,

1.21.0 · source§

impl<T, A> From<Box<T, A>> for Arc<T, A>
where A: Allocator, T: ?Sized,

1.33.0 · source§

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

1.21.0 · source§

impl<T, A> From<Box<T, A>> for Rc<T, A>
where A: Allocator, T: ?Sized,

1.5.0 · source§

impl<T, A> From<Vec<T, A>> for BinaryHeap<T, A>
where T: Ord, A: Allocator,

1.10.0 · source§

impl<T, A> From<Vec<T, A>> for VecDeque<T, A>
where A: Allocator,

1.21.0 · source§

impl<T, A> From<Vec<T, A>> for Arc<[T], A>
where A: Allocator + Clone,

1.21.0 · source§

impl<T, A> From<Vec<T, A>> for Rc<[T], A>
where A: Allocator,

1.20.0 · source§

impl<T, A> From<Vec<T, A>> for gstd::prelude::Box<[T], A>
where A: Allocator,

§

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

§

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

§

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

§

impl<T, A, const N: usize> From<[T; N]> for gstd::prelude::collections::HashSet<T, BuildHasherDefault<AHasher>, A>
where T: Eq + Hash, A: Default + Allocator,

§

impl<T, A, const N: usize> From<Box<[T; N], A>> for Vec<T, A>
where A: Allocator,

§

impl<T, O> From<&BitSlice<T, O>> for BitBox<T, O>
where T: BitStore, O: BitOrder,

§

impl<T, O> From<&BitSlice<T, O>> for BitVec<T, O>
where T: BitStore, O: BitOrder,

§

impl<T, O> From<&mut BitSlice<T, O>> for BitVec<T, O>
where T: BitStore, O: BitOrder,

§

impl<T, O> From<&T> for BitPtr<Const, T, O>
where T: BitStore, O: BitOrder,

§

impl<T, O> From<&mut T> for BitPtr<Mut, T, O>
where T: BitStore, O: BitOrder,

§

impl<T, O> From<Box<T>> for BitBox<T, O>
where T: BitStore, O: BitOrder,

§

impl<T, O> From<BitBox<T, O>> for gstd::prelude::Box<[T]>
where T: BitStore, O: BitOrder,

§

impl<T, O> From<BitBox<T, O>> for BitVec<T, O>
where T: BitStore, O: BitOrder,

§

impl<T, O> From<BitVec<T, O>> for gstd::prelude::Vec<T>
where T: BitStore, O: BitOrder,

§

impl<T, O> From<BitVec<T, O>> for BitBox<T, O>
where T: BitStore, O: BitOrder,

§

impl<T, S, A> From<HashMap<T, (), S, A>> for gstd::prelude::collections::HashSet<T, S, A>
where A: Allocator,

source§

impl<T, const CAP: usize> From<[T; CAP]> for ArrayVec<T, CAP>

Create an ArrayVec from an array.

use arrayvec::ArrayVec;

let mut array = ArrayVec::from([1, 2, 3]);
assert_eq!(array.len(), 3);
assert_eq!(array.capacity(), 3);
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for gstd::prelude::Vec<T>
where T: Clone,

1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for gstd::prelude::Vec<T>
where T: Clone,

1.56.0 · source§

impl<T, const N: usize> From<[T; N]> for BTreeSet<T>
where T: Ord,

1.56.0 · source§

impl<T, const N: usize> From<[T; N]> for BinaryHeap<T>
where T: Ord,

1.56.0 · source§

impl<T, const N: usize> From<[T; N]> for LinkedList<T>

1.56.0 · source§

impl<T, const N: usize> From<[T; N]> for VecDeque<T>

1.74.0 · source§

impl<T, const N: usize> From<[T; N]> for Arc<[T]>

source§

impl<T, const N: usize> From<[T; N]> for Simd<T, N>

1.56.0 · source§

impl<T, const N: usize> From<[T; N]> for std::collections::hash::set::HashSet<T>
where T: Eq + Hash,

1.74.0 · source§

impl<T, const N: usize> From<[T; N]> for Rc<[T]>

1.45.0 · source§

impl<T, const N: usize> From<[T; N]> for gstd::prelude::Box<[T]>

1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for gstd::prelude::Vec<T>

§

impl<T, const N: usize> From<[T; N]> for AHashSet<T>
where T: Eq + Hash,

§

impl<T, const N: usize> From<[T; N]> for Box<[T]>

§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

impl<T, const N: usize> From<Mask<T, N>> for [bool; N]

source§

impl<T, const N: usize> From<Simd<T, N>> for [T; N]

source§

impl<T, const N: usize> From<Mask<T, N>> for Simd<T, N>

source§

impl<T, const N: usize> From<[bool; N]> for Mask<T, N>

1.51.0 · source§

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

1.51.0 · source§

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

source§

impl<W> From<IntoInnerError<W>> for std::io::error::Error

§

impl<W> From<x4<W>> for vec512_storage
where W: Copy, vec128_storage: From<W>,

§

impl<W, G> From<x2<W, G>> for vec256_storage
where W: Copy, vec128_storage: From<W>,

source§

impl<X> From<Range<X>> for Uniform<X>
where X: SampleUniform,

source§

impl<X> From<RangeInclusive<X>> for Uniform<X>
where X: SampleUniform,

source§

impl<const N: usize> From<Mask<i8, N>> for Mask<i16, N>

source§

impl<const N: usize> From<Mask<i8, N>> for Mask<i32, N>

source§

impl<const N: usize> From<Mask<i8, N>> for Mask<i64, N>

source§

impl<const N: usize> From<Mask<i8, N>> for Mask<isize, N>

source§

impl<const N: usize> From<Mask<i16, N>> for Mask<i8, N>

source§

impl<const N: usize> From<Mask<i16, N>> for Mask<i32, N>

source§

impl<const N: usize> From<Mask<i16, N>> for Mask<i64, N>

source§

impl<const N: usize> From<Mask<i16, N>> for Mask<isize, N>

source§

impl<const N: usize> From<Mask<i32, N>> for Mask<i8, N>

source§

impl<const N: usize> From<Mask<i32, N>> for Mask<i16, N>

source§

impl<const N: usize> From<Mask<i32, N>> for Mask<i64, N>

source§

impl<const N: usize> From<Mask<i32, N>> for Mask<isize, N>

source§

impl<const N: usize> From<Mask<i64, N>> for Mask<i8, N>

source§

impl<const N: usize> From<Mask<i64, N>> for Mask<i16, N>

source§

impl<const N: usize> From<Mask<i64, N>> for Mask<i32, N>

source§

impl<const N: usize> From<Mask<i64, N>> for Mask<isize, N>

source§

impl<const N: usize> From<Mask<isize, N>> for Mask<i8, N>

source§

impl<const N: usize> From<Mask<isize, N>> for Mask<i16, N>

source§

impl<const N: usize> From<Mask<isize, N>> for Mask<i32, N>

source§

impl<const N: usize> From<Mask<isize, N>> for Mask<i64, N>