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 From when specifying trait bounds on a generic function
to ensure that types that only implement Into can be used as well.
The From trait 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>.
From simplifies error handling by allowing a function to return a single error type
that encapsulates 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 UimpliesInto<U> for TFromis reflexive, which means thatFrom<T> for Tis 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
TryFrominstead; don’t provide aFromimpl 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 usingu16: TryFrom<i32>. AndString: From<&str>exists, where you can get something equivalent to the original value viaDeref. ButFromcannot be used to convert fromu32tou16, 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 u8is lossless, sinceascasting back can recover the original value, but that conversion is not available viaFrombecause-1and255are different conceptual values (despite being identical bit patterns technically). Butf32: From<i16>is available because1_i16and1.0_f32are conceptually the same real number (despite having very different bit patterns technically).String: From<char>is available because they’re both text, butString: From<u32>is not available, since1(a number) and"1"(text) are too different. (Converting values to text is instead covered by theDisplaytrait.) -
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_bytesis a method and how integers have methods likeu32::from_ne_bytes,u32::from_le_bytes, andu32::from_be_bytes, none of which areFromimplementations. Whereas there’s only one reasonable way to wrap anIpv6Addrinto anIpAddr, thusIpAddr: 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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl From<&str> for ShadowError
impl From<&str> for CrateType
impl From<&str> for TargetKind
impl From<&str> for serde_json::value::Value
impl From<&str> for Box<str>
no_global_oom_handling only.impl From<&str> for String
no_global_oom_handling only.impl From<&str> for Vec<u8>
no_global_oom_handling only.impl From<&str> for Rc<str>
no_global_oom_handling only.impl From<&str> for Arc<str>
no_global_oom_handling only.impl From<&String> for String
no_global_oom_handling only.impl From<&CStr> for Box<CStr>
impl From<&CStr> for CString
impl From<&CStr> for Rc<CStr>
impl From<&CStr> for Arc<CStr>
target_has_atomic=ptr only.impl From<&OsStr> for Box<OsStr>
impl From<&OsStr> for Rc<OsStr>
impl From<&OsStr> for Arc<OsStr>
impl From<&Path> for Box<Path>
impl From<&Path> for Rc<Path>
impl From<&Path> for Arc<Path>
impl From<&Utf8Path> for Box<Path>
impl From<&Utf8Path> for Rc<Path>
impl From<&Utf8Path> for Rc<Utf8Path>
impl From<&Utf8Path> for Arc<Path>
impl From<&Utf8Path> for Arc<Utf8Path>
impl From<&LanguageIdentifier> for (Language, Option<Script>, Option<Region>)
Convert from a LanguageIdentifier to an LSR tuple.
§Examples
use icu::locale::{
langid,
subtags::{language, region, script},
};
let lid = langid!("en-Latn-US");
let (lang, script, region) = (&lid).into();
assert_eq!(lang, language!("en"));
assert_eq!(script, Some(script!("Latn")));
assert_eq!(region, Some(region!("US")));impl From<&LanguageIdentifier> for DataLocale
impl From<&LanguageIdentifier> for LocalePreferences
impl From<&Locale> for DataLocale
impl From<&Locale> for LocalePreferences
impl From<&CurrencyType> for icu_locale_core::extensions::unicode::value::Value
impl From<&NumberingSystem> for icu_locale_core::extensions::unicode::value::Value
impl From<&RegionOverride> for icu_locale_core::extensions::unicode::value::Value
impl From<&RegionalSubdivision> for icu_locale_core::extensions::unicode::value::Value
impl From<&TimeZoneShortId> for icu_locale_core::extensions::unicode::value::Value
impl From<&mut str> for Box<str>
no_global_oom_handling only.impl From<&mut str> for String
no_global_oom_handling only.impl From<&mut str> for Rc<str>
no_global_oom_handling only.impl From<&mut str> for Arc<str>
no_global_oom_handling only.impl From<&mut CStr> for Box<CStr>
impl From<&mut CStr> for Rc<CStr>
impl From<&mut CStr> for Arc<CStr>
target_has_atomic=ptr only.impl From<&mut OsStr> for Box<OsStr>
impl From<&mut OsStr> for Rc<OsStr>
impl From<&mut OsStr> for Arc<OsStr>
impl From<&mut Path> for Box<Path>
impl From<&mut Path> for Rc<Path>
impl From<&mut Path> for Arc<Path>
impl From<(Unit, i64)> for DateTimeRound
impl From<(Unit, i64)> for TimeRound
impl From<(Unit, i64)> for SignedDurationRound
impl From<(Unit, i64)> for SpanRound<'static>
impl From<(Unit, i64)> for TimestampRound
impl From<(Unit, i64)> for OffsetRound
impl From<(Unit, i64)> for ZonedRound
impl From<(Unit, Date)> for DateDifference
impl From<(Unit, Date)> for DateTimeDifference
impl From<(Unit, Date)> for SpanTotal<'static>
impl From<(Unit, DateTime)> for DateDifference
impl From<(Unit, DateTime)> for DateTimeDifference
impl From<(Unit, DateTime)> for TimeDifference
impl From<(Unit, DateTime)> for SpanTotal<'static>
impl From<(Unit, Time)> for TimeDifference
impl From<(Unit, Timestamp)> for TimestampDifference
impl From<(Unit, Zoned)> for DateDifference
impl From<(Unit, Zoned)> for DateTimeDifference
impl From<(Unit, Zoned)> for TimeDifference
impl From<(Unit, Zoned)> for TimestampDifference
impl From<(Duration, Date)> for SpanArithmetic<'static>
impl From<(Duration, DateTime)> for SpanArithmetic<'static>
impl From<(Language, Option<Script>, Option<Region>)> for LanguageIdentifier
Convert from an LSR tuple to a LanguageIdentifier.
§Examples
use icu::locale::{
langid,
subtags::{language, region, script},
LanguageIdentifier,
};
let lang = language!("en");
let script = script!("Latn");
let region = region!("US");
assert_eq!(
LanguageIdentifier::from((lang, Some(script), Some(region))),
langid!("en-Latn-US")
);impl From<(Language, Option<Script>, Option<Region>)> for Locale
§Examples
use icu::locale::Locale;
use icu::locale::{
locale,
subtags::{language, region, script},
};
assert_eq!(
Locale::from((
language!("en"),
Some(script!("Latn")),
Some(region!("US"))
)),
locale!("en-Latn-US")
);impl From<(SignedDuration, Date)> for SpanArithmetic<'static>
impl From<(SignedDuration, DateTime)> for SpanArithmetic<'static>
impl From<(Span, Date)> for SpanArithmetic<'static>
impl From<(Span, Date)> for SpanCompare<'static>
impl From<(Span, DateTime)> for SpanArithmetic<'static>
impl From<(Span, DateTime)> for SpanCompare<'static>
impl From<(Timestamp, Offset)> for Pieces<'static>
impl From<Option<Region>> for LanguageIdentifier
§Examples
use icu::locale::{langid, subtags::region, LanguageIdentifier};
assert_eq!(
LanguageIdentifier::from(Some(region!("US"))),
langid!("und-US")
);impl From<Option<Region>> for Locale
§Examples
use icu::locale::Locale;
use icu::locale::{locale, subtags::region};
assert_eq!(Locale::from(Some(region!("US"))), locale!("und-US"));impl From<Option<Script>> for LanguageIdentifier
§Examples
use icu::locale::{langid, subtags::script, LanguageIdentifier};
assert_eq!(
LanguageIdentifier::from(Some(script!("latn"))),
langid!("und-Latn")
);impl From<Option<Script>> for Locale
§Examples
use icu::locale::Locale;
use icu::locale::{locale, subtags::script};
assert_eq!(Locale::from(Some(script!("latn"))), locale!("und-Latn"));impl From<Cow<'_, str>> for Box<str>
no_global_oom_handling only.impl From<Cow<'_, CStr>> for Box<CStr>
impl From<Cow<'_, OsStr>> for Box<OsStr>
impl From<Cow<'_, Path>> for Box<Path>
impl From<TryReserveErrorKind> for TryReserveError
impl From<AsciiChar> for char
impl From<AsciiChar> for u8
impl From<AsciiChar> for u16
impl From<AsciiChar> for u32
impl From<AsciiChar> for u64
impl From<AsciiChar> for u128
impl From<Infallible> for TryFromSliceError
impl From<Infallible> for TryFromIntError
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.
impl From<VarError> for ShadowError
impl From<TryLockError> for std::io::error::Error
impl From<FileMode> for i32
impl From<FileMode> for u32
impl From<CalendarAlgorithm> for icu_locale_core::extensions::unicode::value::Value
impl From<CollationCaseFirst> for icu_locale_core::extensions::unicode::value::Value
impl From<CollationNumericOrdering> for icu_locale_core::extensions::unicode::value::Value
impl From<CollationType> for icu_locale_core::extensions::unicode::value::Value
impl From<CurrencyFormatStyle> for icu_locale_core::extensions::unicode::value::Value
impl From<EmojiPresentationStyle> for icu_locale_core::extensions::unicode::value::Value
impl From<FirstDay> for icu_locale_core::extensions::unicode::value::Value
impl From<HourCycle> for icu_locale_core::extensions::unicode::value::Value
impl From<LineBreakStyle> for icu_locale_core::extensions::unicode::value::Value
impl From<LineBreakWordHandling> for icu_locale_core::extensions::unicode::value::Value
impl From<MeasurementSystem> for icu_locale_core::extensions::unicode::value::Value
impl From<MeasurementUnitOverride> for icu_locale_core::extensions::unicode::value::Value
impl From<SentenceBreakSupressions> for icu_locale_core::extensions::unicode::value::Value
impl From<CommonVariantType> for icu_locale_core::extensions::unicode::value::Value
impl From<GeneralCategory> for GeneralCategoryGroup
impl From<FractionalUnit> for Unit
impl From<Unit> for DateTimeRound
impl From<Unit> for TimeRound
impl From<Unit> for SignedDurationRound
impl From<Unit> for SpanRound<'static>
impl From<Unit> for SpanTotal<'static>
impl From<Unit> for TimestampRound
impl From<Unit> for OffsetRound
impl From<Unit> for ZonedRound
impl From<bool> for Dst
impl From<bool> for serde_json::value::Value
impl From<bool> for f16
impl From<bool> for f32
impl From<bool> for f64
impl From<bool> for f128
impl From<bool> for i8
impl From<bool> for i16
impl From<bool> for i32
impl From<bool> for i64
impl From<bool> for i128
impl From<bool> for isize
impl From<bool> for u8
impl From<bool> for u16
impl From<bool> for u32
impl From<bool> for u64
impl From<bool> for u128
impl From<bool> for usize
impl From<bool> for Atomic<bool>
target_has_atomic_load_store=8 only.impl From<char> for u32
impl From<char> for u64
impl From<char> for u128
impl From<char> for String
no_global_oom_handling only.impl From<char> for PotentialCodePoint
impl From<f16> for f32
impl From<f16> for f64
impl From<f16> for f128
impl From<f32> for serde_json::value::Value
impl From<f32> for f64
impl From<f32> for f128
impl From<f32> for RawBytesULE<zerovec::::ule::plain::{impl#52}::{constant#0}>
impl From<f64> for serde_json::value::Value
impl From<f64> for f128
impl From<f64> for RawBytesULE<zerovec::::ule::plain::{impl#68}::{constant#0}>
impl From<i8> for serde_json::value::Value
impl From<i8> for f16
impl From<i8> for f32
impl From<i8> for f64
impl From<i8> for f128
impl From<i8> for i16
impl From<i8> for i32
impl From<i8> for i64
impl From<i8> for i128
impl From<i8> for isize
impl From<i8> for Atomic<i8>
impl From<i8> for Number
impl From<i16> for serde_json::value::Value
impl From<i16> for f32
impl From<i16> for f64
impl From<i16> for f128
impl From<i16> for i32
impl From<i16> for i64
impl From<i16> for i128
impl From<i16> for isize
impl From<i16> for Atomic<i16>
impl From<i16> for Number
impl From<i16> for RawBytesULE<zerovec::::ule::plain::{impl#36}::{constant#0}>
impl From<i32> for serde_json::value::Value
impl From<i32> for f64
impl From<i32> for f128
impl From<i32> for i64
impl From<i32> for i128
impl From<i32> for Atomic<i32>
impl From<i32> for Number
impl From<i32> for RawBytesULE<zerovec::::ule::plain::{impl#47}::{constant#0}>
impl From<i64> for serde_json::value::Value
impl From<i64> for f128
impl From<i64> for i128
impl From<i64> for Atomic<i64>
impl From<i64> for Number
impl From<i64> for RawBytesULE<zerovec::::ule::plain::{impl#63}::{constant#0}>
impl From<i128> for RawBytesULE<zerovec::::ule::plain::{impl#79}::{constant#0}>
impl From<isize> for serde_json::value::Value
impl From<isize> for Atomic<isize>
impl From<isize> for Number
impl From<!> for Infallible
impl From<!> for TryFromIntError
impl From<u8> for serde_json::value::Value
impl From<u8> for char
Maps a byte in 0x00..=0xFF to a char whose code point has the same value from U+0000 to U+00FF
(inclusive).
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<u8> for f16
impl From<u8> for f32
impl From<u8> for f64
impl From<u8> for f128
impl From<u8> for i16
impl From<u8> for i32
impl From<u8> for i64
impl From<u8> for i128
impl From<u8> for isize
impl From<u8> for u16
impl From<u8> for u32
impl From<u8> for u64
impl From<u8> for u128
impl From<u8> for usize
impl From<u8> for Atomic<u8>
impl From<u8> for ExitCode
impl From<u8> for Number
impl From<u16> for serde_json::value::Value
impl From<u16> for f32
impl From<u16> for f64
impl From<u16> for f128
impl From<u16> for i32
impl From<u16> for i64
impl From<u16> for i128
impl From<u16> for u32
impl From<u16> for u64
impl From<u16> for u128
impl From<u16> for usize
impl From<u16> for Atomic<u16>
impl From<u16> for Number
impl From<u16> for RawBytesULE<zerovec::::ule::plain::{impl#31}::{constant#0}>
impl From<u32> for serde_json::value::Value
impl From<u32> for f64
impl From<u32> for f128
impl From<u32> for i64
impl From<u32> for i128
impl From<u32> for u64
impl From<u32> for u128
impl From<u32> for Ipv4Addr
impl From<u32> for Atomic<u32>
impl From<u32> for GeneralCategoryGroup
impl From<u32> for Number
impl From<u32> for RawBytesULE<zerovec::::ule::plain::{impl#42}::{constant#0}>
impl From<u64> for serde_json::value::Value
impl From<u64> for f128
impl From<u64> for i128
impl From<u64> for u128
impl From<u64> for Atomic<u64>
impl From<u64> for Number
impl From<u64> for RawBytesULE<zerovec::::ule::plain::{impl#58}::{constant#0}>
impl From<u128> for Ipv6Addr
impl From<u128> for RawBytesULE<zerovec::::ule::plain::{impl#74}::{constant#0}>
impl From<()> for serde_json::value::Value
impl From<usize> for serde_json::value::Value
impl From<usize> for Atomic<usize>
impl From<usize> for Number
impl From<Error> for ProcessingError
impl From<Box<str>> for String
impl From<Box<ByteStr>> for Box<[u8]>
impl From<Box<CStr>> for CString
impl From<Box<OsStr>> for OsString
impl From<Box<Path>> for PathBuf
impl From<Box<Utf8Path>> for Utf8PathBuf
impl From<Box<[u8]>> for Box<ByteStr>
impl From<String> for ShadowError
impl From<String> for serde_json::value::Value
impl From<String> for Box<str>
no_global_oom_handling only.impl From<String> for Vec<u8>
impl From<String> for Rc<str>
no_global_oom_handling only.impl From<String> for Arc<str>
no_global_oom_handling only.impl From<String> for OsString
impl From<String> for PathBuf
impl From<String> for Utf8PathBuf
impl From<Vec<NonZero<u8>>> for CString
impl From<ByteString> for Vec<u8>
impl From<TryReserveError> for std::io::error::Error
impl From<CString> for Box<CStr>
impl From<CString> for Vec<u8>
impl From<CString> for Rc<CStr>
impl From<CString> for Arc<CStr>
target_has_atomic=ptr only.impl From<NulError> for std::io::error::Error
impl From<NulError> for git2::error::Error
impl From<Rc<str>> for Rc<[u8]>
impl From<Rc<ByteStr>> for Rc<[u8]>
no_rc only.impl From<Rc<[u8]>> for Rc<ByteStr>
no_rc only.impl From<FromUtf8Error> for ShadowError
impl From<FromUtf8Error> for cargo_metadata::errors::Error
impl From<Arc<str>> for Arc<[u8]>
impl From<Arc<ByteStr>> for Arc<[u8]>
no_rc and non-no_sync and target_has_atomic=ptr only.impl From<Arc<[u8]>> for Arc<ByteStr>
no_rc and non-no_sync and target_has_atomic=ptr only.impl From<LayoutError> for TryReserveErrorKind
impl From<LayoutError> for CollectionAllocErr
impl From<__m128> for Simd<f32, 4>
impl From<__m128d> for Simd<f64, 2>
impl From<__m128i> for Simd<i8, 16>
impl From<__m128i> for Simd<i16, 8>
impl From<__m128i> for Simd<i32, 4>
impl From<__m128i> for Simd<i64, 2>
impl From<__m128i> for Simd<u8, 16>
impl From<__m128i> for Simd<u16, 8>
impl From<__m128i> for Simd<u32, 4>
impl From<__m128i> for Simd<u64, 2>
impl From<__m256> for Simd<f32, 8>
impl From<__m256d> for Simd<f64, 4>
impl From<__m256i> for Simd<i8, 32>
impl From<__m256i> for Simd<i16, 16>
impl From<__m256i> for Simd<i32, 8>
impl From<__m256i> for Simd<i64, 4>
impl From<__m256i> for Simd<u8, 32>
impl From<__m256i> for Simd<u16, 16>
impl From<__m256i> for Simd<u32, 8>
impl From<__m256i> for Simd<u64, 4>
impl From<__m512> for Simd<f32, 16>
impl From<__m512d> for Simd<f64, 8>
impl From<__m512i> for Simd<i8, 64>
impl From<__m512i> for Simd<i16, 32>
impl From<__m512i> for Simd<i32, 16>
impl From<__m512i> for Simd<i64, 8>
impl From<__m512i> for Simd<u8, 64>
impl From<__m512i> for Simd<u16, 32>
impl From<__m512i> for Simd<u32, 16>
impl From<__m512i> for Simd<u64, 8>
impl From<Simd<f32, 4>> for __m128
impl From<Simd<f32, 8>> for __m256
impl From<Simd<f32, 16>> for __m512
impl From<Simd<f64, 2>> for __m128d
impl From<Simd<f64, 4>> for __m256d
impl From<Simd<f64, 8>> for __m512d
impl From<Simd<i8, 16>> for __m128i
impl From<Simd<i8, 32>> for __m256i
impl From<Simd<i8, 64>> for __m512i
impl From<Simd<i16, 8>> for __m128i
impl From<Simd<i16, 16>> for __m256i
impl From<Simd<i16, 32>> for __m512i
impl From<Simd<i32, 4>> for __m128i
impl From<Simd<i32, 8>> for __m256i
impl From<Simd<i32, 16>> for __m512i
impl From<Simd<i64, 2>> for __m128i
impl From<Simd<i64, 4>> for __m256i
impl From<Simd<i64, 8>> for __m512i
impl From<Simd<u8, 16>> for __m128i
impl From<Simd<u8, 32>> for __m256i
impl From<Simd<u8, 64>> for __m512i
impl From<Simd<u16, 8>> for __m128i
impl From<Simd<u16, 16>> for __m256i
impl From<Simd<u16, 32>> for __m512i
impl From<Simd<u32, 4>> for __m128i
impl From<Simd<u32, 8>> for __m256i
impl From<Simd<u32, 16>> for __m512i
impl From<Simd<u64, 2>> for __m128i
impl From<Simd<u64, 4>> for __m256i
impl From<Simd<u64, 8>> for __m512i
impl From<Alignment> for usize
impl From<Alignment> for NonZero<usize>
impl From<Ipv4Addr> for IpAddr
impl From<Ipv4Addr> for u32
impl From<Ipv6Addr> for IpAddr
impl From<Ipv6Addr> for u128
impl From<SocketAddrV4> for SocketAddr
impl From<SocketAddrV6> for SocketAddr
impl From<ParseIntError> for ShadowError
impl From<NonZero<i8>> for NonZero<i16>
impl From<NonZero<i8>> for NonZero<i32>
impl From<NonZero<i8>> for NonZero<i64>
impl From<NonZero<i8>> for NonZero<i128>
impl From<NonZero<i8>> for NonZero<isize>
impl From<NonZero<i16>> for NonZero<i32>
impl From<NonZero<i16>> for NonZero<i64>
impl From<NonZero<i16>> for NonZero<i128>
impl From<NonZero<i16>> for NonZero<isize>
impl From<NonZero<i32>> for NonZero<i64>
impl From<NonZero<i32>> for NonZero<i128>
impl From<NonZero<i64>> for NonZero<i128>
impl From<NonZero<u8>> for NonZero<i16>
impl From<NonZero<u8>> for NonZero<i32>
impl From<NonZero<u8>> for NonZero<i64>
impl From<NonZero<u8>> for NonZero<i128>
impl From<NonZero<u8>> for NonZero<isize>
impl From<NonZero<u8>> for NonZero<u16>
impl From<NonZero<u8>> for NonZero<u32>
impl From<NonZero<u8>> for NonZero<u64>
impl From<NonZero<u8>> for NonZero<u128>
impl From<NonZero<u8>> for NonZero<usize>
impl From<NonZero<u16>> for NonZero<i32>
impl From<NonZero<u16>> for NonZero<i64>
impl From<NonZero<u16>> for NonZero<i128>
impl From<NonZero<u16>> for NonZero<u32>
impl From<NonZero<u16>> for NonZero<u64>
impl From<NonZero<u16>> for NonZero<u128>
impl From<NonZero<u16>> for NonZero<usize>
impl From<NonZero<u32>> for NonZero<i64>
impl From<NonZero<u32>> for NonZero<i128>
impl From<NonZero<u32>> for NonZero<u64>
impl From<NonZero<u32>> for NonZero<u128>
impl From<NonZero<u64>> for NonZero<i128>
impl From<NonZero<u64>> for NonZero<u128>
impl From<Utf8Error> for cargo_metadata::errors::Error
impl From<Duration> for DateArithmetic
impl From<Duration> for DateTimeArithmetic
impl From<Duration> for TimeArithmetic
impl From<Duration> for SpanArithmetic<'static>
impl From<Duration> for TimestampArithmetic
impl From<Duration> for OffsetArithmetic
impl From<Duration> for ZonedArithmetic
impl From<JoinPathsError> for git2::error::Error
impl From<OsString> for Box<OsStr>
impl From<OsString> for Rc<OsStr>
impl From<OsString> for Arc<OsStr>
impl From<OsString> for PathBuf
impl From<Dir> for OwnedFd
impl From<File> for OwnedFd
impl From<File> for Stdio
impl From<Error> for ShadowError
impl From<Error> for cargo_metadata::errors::Error
impl From<PipeReader> for OwnedFd
impl From<PipeReader> for Stdio
impl From<PipeWriter> for OwnedFd
impl From<PipeWriter> for Stdio
impl From<Stderr> for Stdio
impl From<Stdout> for Stdio
impl From<TcpListener> for OwnedFd
impl From<TcpStream> for OwnedFd
impl From<UdpSocket> for OwnedFd
impl From<OwnedFd> for Dir
impl From<OwnedFd> for File
impl From<OwnedFd> for PipeReader
impl From<OwnedFd> for PipeWriter
impl From<OwnedFd> for TcpListener
impl From<OwnedFd> for TcpStream
impl From<OwnedFd> for UdpSocket
impl From<OwnedFd> for PidFd
impl From<OwnedFd> for UnixDatagram
impl From<OwnedFd> for UnixListener
impl From<OwnedFd> for UnixStream
impl From<OwnedFd> for ChildStderr
Creates a ChildStderr from the provided OwnedFd.
The provided file descriptor must point to a pipe
with the CLOEXEC flag set.
impl From<OwnedFd> for ChildStdin
Creates a ChildStdin from the provided OwnedFd.
The provided file descriptor must point to a pipe
with the CLOEXEC flag set.
impl From<OwnedFd> for ChildStdout
Creates a ChildStdout from the provided OwnedFd.
The provided file descriptor must point to a pipe
with the CLOEXEC flag set.
impl From<OwnedFd> for Stdio
impl From<PidFd> for OwnedFd
impl From<UnixDatagram> for OwnedFd
impl From<UnixListener> for OwnedFd
impl From<UnixStream> for OwnedFd
impl From<PathBuf> for Box<Path>
impl From<PathBuf> for Rc<Path>
impl From<PathBuf> for Arc<Path>
impl From<PathBuf> for OsString
impl From<ChildStderr> for OwnedFd
impl From<ChildStderr> for Stdio
impl From<ChildStdin> for OwnedFd
impl From<ChildStdin> for Stdio
impl From<ChildStdout> for OwnedFd
impl From<ChildStdout> for Stdio
impl From<ExitStatusError> for ExitStatus
impl From<RecvError> for std::sync::mpsc::RecvTimeoutError
impl From<RecvError> for std::sync::mpsc::TryRecvError
impl From<Utf8PathBuf> for Box<Path>
impl From<Utf8PathBuf> for Box<Utf8Path>
impl From<Utf8PathBuf> for String
impl From<Utf8PathBuf> for Rc<Path>
impl From<Utf8PathBuf> for Rc<Utf8Path>
impl From<Utf8PathBuf> for Arc<Path>
impl From<Utf8PathBuf> for Arc<Utf8Path>
impl From<Utf8PathBuf> for OsString
impl From<Utf8PathBuf> for PathBuf
impl From<Subtag> for TinyAsciiStr<8>
impl From<Key> for TinyAsciiStr<2>
impl From<Attribute> for TinyAsciiStr<8>
impl From<Key> for TinyAsciiStr<2>
impl From<SubdivisionSuffix> for TinyAsciiStr<4>
impl From<LanguageIdentifier> for DataLocale
impl From<LanguageIdentifier> for Locale
impl From<Locale> for DataLocale
impl From<Locale> for LanguageIdentifier
impl From<CurrencyType> for icu_locale_core::extensions::unicode::value::Value
impl From<NumberingSystem> for icu_locale_core::extensions::unicode::value::Value
impl From<RegionOverride> for icu_locale_core::extensions::unicode::value::Value
impl From<RegionalSubdivision> for icu_locale_core::extensions::unicode::value::Value
impl From<TimeZoneShortId> for icu_locale_core::extensions::unicode::value::Value
impl From<Language> for LanguageIdentifier
§Examples
use icu::locale::{langid, subtags::language, LanguageIdentifier};
assert_eq!(LanguageIdentifier::from(language!("en")), langid!("en"));impl From<Language> for Locale
§Examples
use icu::locale::Locale;
use icu::locale::{locale, subtags::language};
assert_eq!(Locale::from(language!("en")), locale!("en"));impl From<Language> for TinyAsciiStr<3>
impl From<Region> for TinyAsciiStr<3>
impl From<Script> for Subtag
impl From<Script> for icu_properties::props::Script
compiled_data only.✨ Enabled with the compiled_data Cargo feature.
impl From<Script> for TinyAsciiStr<4>
impl From<Subtag> for TinyAsciiStr<8>
impl From<Variant> for TinyAsciiStr<8>
impl From<BidiClass> for u16
impl From<CanonicalCombiningClass> for u16
impl From<EastAsianWidth> for u16
impl From<GeneralCategoryGroup> for u32
impl From<GraphemeClusterBreak> for u16
impl From<HangulSyllableType> for u16
impl From<IndicConjunctBreak> for u16
impl From<IndicSyllabicCategory> for u16
impl From<JoiningGroup> for u16
impl From<JoiningType> for u16
impl From<LineBreak> for u16
impl From<NumericType> for u16
impl From<Script> for u16
impl From<Script> for icu_locale_core::subtags::script::Script
compiled_data only.✨ Enabled with the compiled_data Cargo feature.
impl From<SentenceBreak> for u16
impl From<VerticalOrientation> for u16
impl From<WordBreak> for u16
impl From<Errors> for Result<(), Errors>
impl From<Errors> for ParseError
impl From<Date> for DateDifference
impl From<Date> for DateTime
impl From<Date> for DateTimeDifference
impl From<Date> for ISOWeekDate
impl From<Date> for BrokenDownTime
impl From<Date> for Pieces<'static>
impl From<Date> for SpanRelativeTo<'static>
impl From<DateTime> for Date
impl From<DateTime> for DateDifference
impl From<DateTime> for DateTimeDifference
impl From<DateTime> for ISOWeekDate
impl From<DateTime> for Time
impl From<DateTime> for TimeDifference
impl From<DateTime> for BrokenDownTime
impl From<DateTime> for Pieces<'static>
impl From<DateTime> for SpanRelativeTo<'static>
impl From<ISOWeekDate> for Date
impl From<ISOWeekDate> for BrokenDownTime
impl From<Time> for Meridiem
impl From<Time> for TimeDifference
impl From<Time> for BrokenDownTime
impl From<PiecesNumericOffset> for PiecesOffset
impl From<SignedDuration> for DateArithmetic
impl From<SignedDuration> for DateTimeArithmetic
impl From<SignedDuration> for TimeArithmetic
impl From<SignedDuration> for SpanArithmetic<'static>
impl From<SignedDuration> for TimestampArithmetic
impl From<SignedDuration> for OffsetArithmetic
impl From<SignedDuration> for ZonedArithmetic
impl From<Span> for DateArithmetic
impl From<Span> for DateTimeArithmetic
impl From<Span> for TimeArithmetic
impl From<Span> for SpanArithmetic<'static>
impl From<Span> for SpanCompare<'static>
impl From<Span> for SpanFieldwise
impl From<Span> for TimestampArithmetic
impl From<Span> for OffsetArithmetic
impl From<Span> for ZonedArithmetic
impl From<SpanFieldwise> for Span
impl From<Timestamp> for SystemTime
std only.impl From<Timestamp> for BrokenDownTime
impl From<Timestamp> for Pieces<'static>
impl From<Timestamp> for TimestampDifference
impl From<Offset> for PiecesOffset
impl From<Offset> for TimeZoneAnnotationKind<'static>
impl From<Offset> for PiecesNumericOffset
impl From<Offset> for TimeZoneAnnotation<'static>
impl From<Offset> for SignedDuration
impl From<Zoned> for SystemTime
std only.impl From<Zoned> for Date
impl From<Zoned> for DateDifference
impl From<Zoned> for DateTime
impl From<Zoned> for DateTimeDifference
impl From<Zoned> for ISOWeekDate
impl From<Zoned> for Time
impl From<Zoned> for TimeDifference
impl From<Zoned> for Timestamp
impl From<Zoned> for TimestampDifference
impl From<LiteMap<Key, Value, ShortBoxSlice<(Key, Value)>>> for Keywords
impl From<PotentialCodePoint> for u32
impl From<Error> for cargo_metadata::errors::Error
impl From<Error> for std::io::error::Error
std only.impl From<Map<String, Value>> for serde_json::value::Value
impl From<Number> for serde_json::value::Value
impl From<Url> for String
String conversion.
impl From<BoundsError> for jiff::error::Error
impl From<CrateFeatureError> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<Error> for jiff::error::Error
impl From<ErrorKind> for jiff::error::Error
impl From<FormatError> for jiff::error::Error
impl From<OsStrUtf8Error> for jiff::error::Error
impl From<ParseError> for jiff::error::Error
impl From<ParseFractionError> for jiff::error::Error
impl From<ParseIntError> for jiff::error::Error
impl From<ParserNumber> for Number
impl From<PunycodeEncodeError> for ProcessingError
impl From<RoundingIncrementError> for jiff::error::Error
impl From<Simd<f16, 8>> for __m128h
impl From<Simd<f16, 16>> for __m256h
impl From<Simd<f16, 32>> for __m512h
impl From<Simd<f32, 4>> for __m128
impl From<Simd<f32, 8>> for __m256
impl From<Simd<f32, 16>> for __m512
impl From<Simd<f64, 2>> for __m128d
impl From<Simd<f64, 4>> for __m256d
impl From<Simd<f64, 8>> for __m512d
impl From<Simd<i64, 2>> for __m128i
impl From<Simd<i64, 4>> for __m256i
impl From<Simd<i64, 8>> for __m512i
impl From<Simd<u16, 8>> for __m128bh
impl From<Simd<u16, 16>> for __m256bh
impl From<Simd<u16, 32>> for __m512bh
impl From<SpecialBoundsError> for jiff::error::Error
impl From<UnitConfigError> for jiff::error::Error
impl From<[u8; 4]> for IpAddr
impl From<[u8; 4]> for Ipv4Addr
impl From<[u8; 16]> for IpAddr
impl From<[u8; 16]> for Ipv6Addr
impl From<[u16; 8]> for IpAddr
impl From<[u16; 8]> for Ipv6Addr
impl<'a> From<&'a str> for &'a Utf8Path
impl<'a> From<&'a str> for &'a PotentialUtf8
impl<'a> From<&'a str> for Cow<'a, str>
no_global_oom_handling only.impl<'a> From<&'a String> for Cow<'a, str>
no_global_oom_handling only.impl<'a> From<&'a ByteString> for Cow<'a, ByteStr>
impl<'a> From<&'a CString> for Cow<'a, CStr>
impl<'a> From<&'a ByteStr> for Cow<'a, ByteStr>
impl<'a> From<&'a ByteStr> for ByteString
impl<'a> From<&'a CStr> for Cow<'a, CStr>
impl<'a> From<&'a Duration> for DateArithmetic
impl<'a> From<&'a Duration> for DateTimeArithmetic
impl<'a> From<&'a Duration> for TimeArithmetic
impl<'a> From<&'a Duration> for TimestampArithmetic
impl<'a> From<&'a Duration> for OffsetArithmetic
impl<'a> From<&'a Duration> for ZonedArithmetic
impl<'a> From<&'a OsStr> for Cow<'a, OsStr>
impl<'a> From<&'a OsString> for Cow<'a, OsStr>
impl<'a> From<&'a Path> for Cow<'a, Path>
impl<'a> From<&'a PathBuf> for Cow<'a, Path>
impl<'a> From<&'a Utf8Path> for Cow<'a, Path>
impl<'a> From<&'a Utf8Path> for Cow<'a, Utf8Path>
impl<'a> From<&'a SignedDuration> for DateArithmetic
impl<'a> From<&'a SignedDuration> for DateTimeArithmetic
impl<'a> From<&'a SignedDuration> for TimeArithmetic
impl<'a> From<&'a SignedDuration> for TimestampArithmetic
impl<'a> From<&'a SignedDuration> for OffsetArithmetic
impl<'a> From<&'a SignedDuration> for ZonedArithmetic
impl<'a> From<&'a Span> for DateArithmetic
impl<'a> From<&'a Span> for DateTimeArithmetic
impl<'a> From<&'a Span> for TimeArithmetic
impl<'a> From<&'a Span> for SpanArithmetic<'static>
impl<'a> From<&'a Span> for SpanCompare<'static>
impl<'a> From<&'a Span> for TimestampArithmetic
impl<'a> From<&'a Span> for OffsetArithmetic
impl<'a> From<&'a Span> for ZonedArithmetic
impl<'a> From<&'a Zoned> for SystemTime
std only.impl<'a> From<&'a Zoned> for Date
impl<'a> From<&'a Zoned> for DateDifference
impl<'a> From<&'a Zoned> for DateTime
impl<'a> From<&'a Zoned> for DateTimeDifference
impl<'a> From<&'a Zoned> for ISOWeekDate
impl<'a> From<&'a Zoned> for Time
impl<'a> From<&'a Zoned> for TimeDifference
impl<'a> From<&'a Zoned> for BrokenDownTime
impl<'a> From<&'a Zoned> for Pieces<'a>
impl<'a> From<&'a Zoned> for SpanRelativeTo<'a>
impl<'a> From<&'a Zoned> for Timestamp
impl<'a> From<&'a Zoned> for TimestampDifference
impl<'a> From<&'a Zoned> for ZonedDifference<'a>
impl<'a> From<&str> for Box<dyn Error + 'a>
no_global_oom_handling only.impl<'a> From<&str> for Box<dyn Error + Send + Sync + 'a>
no_global_oom_handling only.impl<'a> From<(&'a Span, Date)> for SpanArithmetic<'static>
impl<'a> From<(&'a Span, Date)> for SpanCompare<'static>
impl<'a> From<(&'a Span, DateTime)> for SpanArithmetic<'static>
impl<'a> From<(&'a Span, DateTime)> for SpanCompare<'static>
impl<'a> From<(Unit, &'a Zoned)> for DateDifference
impl<'a> From<(Unit, &'a Zoned)> for DateTimeDifference
impl<'a> From<(Unit, &'a Zoned)> for TimeDifference
impl<'a> From<(Unit, &'a Zoned)> for SpanTotal<'a>
impl<'a> From<(Unit, &'a Zoned)> for TimestampDifference
impl<'a> From<(Unit, &'a Zoned)> for ZonedDifference<'a>
impl<'a> From<(Unit, SpanRelativeTo<'a>)> for SpanTotal<'a>
impl<'a> From<(Duration, &'a Zoned)> for SpanArithmetic<'a>
impl<'a> From<(SignedDuration, &'a Zoned)> for SpanArithmetic<'a>
impl<'a> From<(Span, &'a Zoned)> for SpanArithmetic<'a>
impl<'a> From<(Span, &'a Zoned)> for SpanCompare<'a>
impl<'a> From<(Span, SpanRelativeTo<'a>)> for SpanArithmetic<'a>
impl<'a> From<(Span, SpanRelativeTo<'a>)> for SpanCompare<'a>
impl<'a> From<Cow<'a, str>> for serde_json::value::Value
impl<'a> From<Cow<'a, str>> for String
no_global_oom_handling only.impl<'a> From<Cow<'a, CStr>> for CString
impl<'a> From<Cow<'a, OsStr>> for OsString
impl<'a> From<Cow<'a, Path>> for PathBuf
impl<'a> From<Cow<'a, Utf8Path>> for Utf8PathBuf
impl<'a> From<String> for Cow<'a, str>
no_global_oom_handling only.impl<'a> From<String> for Box<dyn Error + 'a>
no_global_oom_handling only.impl<'a> From<String> for Box<dyn Error + Send + Sync + 'a>
no_global_oom_handling only.impl<'a> From<ByteString> for Cow<'a, ByteStr>
impl<'a> From<CString> for Cow<'a, CStr>
impl<'a> From<OsString> for Cow<'a, OsStr>
impl<'a> From<PathBuf> for Cow<'a, Path>
impl<'a> From<Utf8PathBuf> for Cow<'a, Path>
impl<'a> From<Utf8PathBuf> for Cow<'a, Utf8Path>
impl<'a> From<PercentDecode<'a>> for Cow<'a, [u8]>
alloc only.impl<'a> From<PercentEncode<'a>> for Cow<'a, str>
alloc only.impl<'a, 'b> From<(&'a Span, &'b Zoned)> for SpanArithmetic<'b>
impl<'a, 'b> From<(&'a Span, &'b Zoned)> for SpanCompare<'b>
impl<'a, 'b> From<(&'a Span, SpanRelativeTo<'b>)> for SpanArithmetic<'b>
impl<'a, 'b> From<(&'a Span, SpanRelativeTo<'b>)> for SpanCompare<'b>
impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + 'a>
no_global_oom_handling only.impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + Send + Sync + 'a>
no_global_oom_handling only.impl<'a, A> From<&'a [<A as Array>::Item]> for SmallVec<A>
impl<'a, B> From<Cow<'a, B>> for Rc<B>
impl<'a, B> From<Cow<'a, B>> for Arc<B>
impl<'a, E> From<E> for Box<dyn Error + 'a>where
E: Error + 'a,
no_global_oom_handling only.impl<'a, E> From<E> for Box<dyn Error + Send + Sync + 'a>
no_global_oom_handling only.impl<'a, T> From<&'a Option<T>> for Option<&'a T>
impl<'a, T> From<&'a [T]> for Cow<'a, [T]>where
T: Clone,
impl<'a, T> From<&'a Vec<T>> for Cow<'a, [T]>where
T: Clone,
impl<'a, T> From<&'a [<T as AsULE>::ULE]> for ZeroVec<'a, T>where
T: AsULE,
impl<'a, T> From<&'a mut Option<T>> for Option<&'a mut T>
impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
impl<'a, T> From<Vec<T>> for Cow<'a, [T]>where
T: Clone,
impl<'a, T, F> From<&'a VarZeroSlice<T, F>> for VarZeroVec<'a, T, F>where
T: ?Sized,
impl<'a, T, const N: usize> From<&'a [T; N]> for Cow<'a, [T]>where
T: Clone,
impl<'a, V> From<&'a V> for VarZeroCow<'a, V>
impl<'data> From<&'data CodePointInversionListULE> for CodePointInversionList<'data>
impl<'data> From<&'data CodePointInversionListAndStringListULE> for CodePointInversionListAndStringList<'data>
impl<'data> From<&'data mut [u8]> for BorrowedBuf<'data>
Creates a new BorrowedBuf from a fully initialized slice.
impl<'data> From<&'data mut [MaybeUninit<u8>]> for BorrowedBuf<'data>
Creates a new BorrowedBuf from an uninitialized buffer.
impl<'data> From<BorrowedCursor<'data>> for BorrowedBuf<'data>
Creates a new BorrowedBuf from a cursor.
Use BorrowedCursor::with_unfilled_buf instead for a safer alternative.
impl<'l> From<&'l Subtag> for &'l str
impl<'l> From<&'l Key> for &'l str
impl<'l> From<&'l Attribute> for &'l str
impl<'l> From<&'l Key> for &'l str
impl<'l> From<&'l SubdivisionSuffix> for &'l str
impl<'l> From<&'l Language> for &'l str
impl<'l> From<&'l Region> for &'l str
impl<'l> From<&'l Script> for &'l str
impl<'l> From<&'l Subtag> for &'l str
impl<'l> From<&'l Variant> for &'l str
impl<'n> From<&'n str> for TimeZoneAnnotationKind<'n>
impl<'n> From<&'n str> for TimeZoneAnnotation<'n>
impl<'n> From<&'n str> for TimeZoneAnnotationName<'n>
impl<A> From<Box<str, A>> for Box<[u8], A>where
A: Allocator,
impl<A> From<Vec<<A as Array>::Item>> for SmallVec<A>where
A: Array,
impl<A> From<A> for SmallVec<A>where
A: Array,
impl<E> From<E> for Report<E>where
E: Error,
impl<I> From<(I, u16)> for SocketAddr
impl<K, V, const N: usize> From<[(K, V); N]> for BTreeMap<K, V>where
K: Ord,
impl<K, V, const N: usize> From<[(K, V); N]> for HashMap<K, V>
impl<T> From<&[T]> for serde_json::value::Value
impl<T> From<&[T]> for Box<[T]>where
T: Clone,
no_global_oom_handling only.impl<T> From<&[T]> for Vec<T>where
T: Clone,
no_global_oom_handling only.impl<T> From<&[T]> for Rc<[T]>where
T: Clone,
no_global_oom_handling only.impl<T> From<&[T]> for Arc<[T]>where
T: Clone,
no_global_oom_handling only.impl<T> From<&mut [T]> for Box<[T]>where
T: Clone,
no_global_oom_handling only.impl<T> From<&mut [T]> for Vec<T>where
T: Clone,
no_global_oom_handling only.impl<T> From<&mut [T]> for Rc<[T]>where
T: Clone,
no_global_oom_handling only.impl<T> From<&mut [T]> for Arc<[T]>where
T: Clone,
no_global_oom_handling only.impl<T> From<Option<T>> for serde_json::value::Value
impl<T> From<Cow<'_, [T]>> for Box<[T]>where
T: Clone,
no_global_oom_handling only.impl<T> From<[T; N]> for (T₁, T₂, …, Tₙ)
This trait is implemented for tuples up to twelve items long.
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.
impl<T> From<*mut T> for Atomic<*mut T>
target_has_atomic_load_store=ptr only.impl<T> From<&T> for Box<Utf8Path>
impl<T> From<&T> for NonNull<T>where
T: ?Sized,
impl<T> From<&T> for OsString
impl<T> From<&T> for PathBuf
impl<T> From<&T> for Utf8PathBuf
impl<T> From<&mut T> for NonNull<T>where
T: ?Sized,
impl<T> From<(T₁, T₂, …, Tₙ)> for [T; N]
This trait is implemented for tuples up to twelve items long.
impl<T> From<Vec<T>> for serde_json::value::Value
impl<T> From<NonZero<T>> for Twhere
T: ZeroablePrimitive,
impl<T> From<Range<T>> for core::range::Range<T>
impl<T> From<RangeFrom<T>> for core::range::RangeFrom<T>
impl<T> From<RangeInclusive<T>> for core::range::RangeInclusive<T>
impl<T> From<RangeToInclusive<T>> for core::range::RangeToInclusive<T>
impl<T> From<Range<T>> for core::ops::range::Range<T>
impl<T> From<RangeFrom<T>> for core::ops::range::RangeFrom<T>
impl<T> From<RangeInclusive<T>> for core::ops::range::RangeInclusive<T>
impl<T> From<RangeToInclusive<T>> for core::ops::range::RangeToInclusive<T>
impl<T> From<RecvError> for std::sync::oneshot::RecvTimeoutError<T>
impl<T> From<RecvError> for std::sync::oneshot::TryRecvError<T>
impl<T> From<SendError<T>> for SendTimeoutError<T>
impl<T> From<SendError<T>> for TrySendError<T>
impl<T> From<PoisonError<T>> for TryLockError<T>
impl<T> From<T> for Option<T>
impl<T> From<T> for Poll<T>
impl<T> From<T> for Box<T>
no_global_oom_handling only.impl<T> From<T> for ThinBox<T>
no_global_oom_handling only.impl<T> From<T> for Rc<T>
no_global_oom_handling only.impl<T> From<T> for UniqueRc<T>
no_global_oom_handling only.impl<T> From<T> for Arc<T>
no_global_oom_handling only.impl<T> From<T> for UniqueArc<T>
no_global_oom_handling only.impl<T> From<T> for OnceCell<T>
impl<T> From<T> for Cell<T>
impl<T> From<T> for RefCell<T>
impl<T> From<T> for SyncUnsafeCell<T>
impl<T> From<T> for UnsafeCell<T>
impl<T> From<T> for AssertUnwindSafe<T>where
T: UnwindSafe,
If a value’s type is already UnwindSafe,
wrapping it in AssertUnwindSafe is never incorrect.
impl<T> From<T> for UnsafePinned<T>
impl<T> From<T> for SyncView<T>
impl<T> From<T> for std::sync::nonpoison::mutex::Mutex<T>
impl<T> From<T> for std::sync::nonpoison::rwlock::RwLock<T>
impl<T> From<T> for OnceLock<T>
impl<T> From<T> for std::sync::poison::mutex::Mutex<T>
impl<T> From<T> for std::sync::poison::rwlock::RwLock<T>
impl<T> From<T> for ReentrantLock<T>
impl<T> From<T> for T
impl<T, A> From<Box<[T], A>> for Vec<T, A>where
A: Allocator,
impl<T, A> From<Box<T, A>> for Rc<T, A>
no_global_oom_handling only.impl<T, A> From<Box<T, A>> for Arc<T, A>
no_global_oom_handling only.impl<T, A> From<Box<T, A>> for Pin<Box<T, A>>
impl<T, A> From<Vec<T, A>> for Box<[T], A>where
A: Allocator,
no_global_oom_handling only.impl<T, A> From<Vec<T, A>> for BinaryHeap<T, A>
impl<T, A> From<Vec<T, A>> for VecDeque<T, A>where
A: Allocator,
impl<T, A> From<Vec<T, A>> for Rc<[T], A>where
A: Allocator,
no_global_oom_handling only.impl<T, A> From<Vec<T, A>> for Arc<[T], A>
no_global_oom_handling only.impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>where
A: Allocator,
impl<T, A> From<VecDeque<T, A>> for Vec<T, A>where
A: Allocator,
impl<T, F> From<T> for LazyCell<T, F>
impl<T, F> From<T> for LazyLock<T, F>
impl<T, const N: usize> From<&[T; N]> for Vec<T>where
T: Clone,
no_global_oom_handling only.impl<T, const N: usize> From<&mut [T; N]> for Vec<T>where
T: Clone,
no_global_oom_handling only.impl<T, const N: usize> From<[T; N]> for serde_json::value::Value
impl<T, const N: usize> From<[T; N]> for Box<[T]>
no_global_oom_handling only.impl<T, const N: usize> From<[T; N]> for Vec<T>
no_global_oom_handling only.impl<T, const N: usize> From<[T; N]> for BinaryHeap<T>where
T: Ord,
impl<T, const N: usize> From<[T; N]> for BTreeSet<T>where
T: Ord,
impl<T, const N: usize> From<[T; N]> for LinkedList<T>
impl<T, const N: usize> From<[T; N]> for VecDeque<T>
impl<T, const N: usize> From<[T; N]> for Rc<[T]>
no_global_oom_handling only.impl<T, const N: usize> From<[T; N]> for Arc<[T]>
no_global_oom_handling only.impl<T, const N: usize> From<[T; N]> for Simd<T, N>where
T: SimdElement,
impl<T, const N: usize> From<[T; N]> for HashSet<T>
impl<T, const N: usize> From<Mask<T, N>> for [bool; N]where
T: MaskElement,
impl<T, const N: usize> From<Simd<T, N>> for [T; N]where
T: SimdElement,
impl<T, const N: usize> From<MaybeUninit<[T; N]>> for [MaybeUninit<T>; N]
impl<T, const N: usize> From<[bool; N]> for Mask<T, N>where
T: MaskElement,
impl<T, const N: usize> From<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>
impl<W> From<Rc<W>> for LocalWakerwhere
W: LocalWake + 'static,
impl<W> From<Rc<W>> for RawWakerwhere
W: LocalWake + 'static,
impl<W> From<Arc<W>> for RawWaker
target_has_atomic=ptr only.impl<W> From<Arc<W>> for Waker
target_has_atomic=ptr only.