Trait TryFrom

1.34.0 (const: unstable) ยท Source
pub trait TryFrom<T>: Sized {
    type Error;

    // Required method
    fn try_from(value: T) -> Result<Self, Self::Error>;
}
Expand description

Simple and safe type conversions that may fail in a controlled way under some circumstances. It is the reciprocal of TryInto.

This is useful when you are doing a type conversion that may trivially succeed but may also need special handling. For example, there is no way to convert an i64 into an i32 using the From trait, because an i64 may contain a value that an i32 cannot represent and so the conversion would lose data. This might be handled by truncating the i64 to an i32 or by simply returning i32::MAX, or by some other method. The From trait is intended for perfect conversions, so the TryFrom trait informs the programmer when a type conversion could go bad and lets them decide how to handle it.

ยงGeneric Implementations

  • TryFrom<T> for U implies TryInto<U> for T
  • try_from is reflexive, which means that TryFrom<T> for T is implemented and cannot fail โ€“ the associated Error type for calling T::try_from() on a value of type T is Infallible. When the ! type is stabilized Infallible and ! will be equivalent.

Prefer using TryInto over TryFrom when specifying trait bounds on a generic function to ensure that types that only implement TryInto can be used as well.

TryFrom<T> can be implemented as follows:

struct GreaterThanZero(i32);

impl TryFrom<i32> for GreaterThanZero {
    type Error = &'static str;

    fn try_from(value: i32) -> Result<Self, Self::Error> {
        if value <= 0 {
            Err("GreaterThanZero only accepts values greater than zero!")
        } else {
            Ok(GreaterThanZero(value))
        }
    }
}

ยงExamples

As described, i32 implements TryFrom<i64>:

let big_number = 1_000_000_000_000i64;
// Silently truncates `big_number`, requires detecting
// and handling the truncation after the fact.
let smaller_number = big_number as i32;
assert_eq!(smaller_number, -727379968);

// Returns an error because `big_number` is too big to
// fit in an `i32`.
let try_smaller_number = i32::try_from(big_number);
assert!(try_smaller_number.is_err());

// Returns `Ok(3)`.
let try_successful_smaller_number = i32::try_from(3);
assert!(try_successful_smaller_number.is_ok());

Required Associated Typesยง

1.34.0 ยท Source

type Error

The type returned in the event of a conversion error.

Required Methodsยง

1.34.0 ยท Source

fn try_from(value: T) -> Result<Self, Self::Error>

Performs the conversion.

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ยง

Sourceยง

impl TryFrom<&str> for LoginError

Sourceยง

type Error = ParseError

Sourceยง

impl TryFrom<&str> for Uuid

ยง

impl TryFrom<&str> for Alphabet

ยง

type Error = ParseAlphabetError

ยง

impl TryFrom<&str> for IpAddr

ยง

type Error = AddrParseError

ยง

impl TryFrom<&str> for Ipv4Addr

ยง

type Error = AddrParseError

ยง

impl TryFrom<&str> for Ipv6Addr

ยง

type Error = AddrParseError

ยง

impl TryFrom<&str> for Query

ยง

type Error = SparqlSyntaxError

ยง

impl TryFrom<&str> for Query

ยง

type Error = SparqlSyntaxError

ยง

impl TryFrom<&str> for Regex

ยง

type Error = Error

ยง

impl TryFrom<&str> for Regex

ยง

type Error = Error

ยง

impl TryFrom<&str> for Schedule

ยง

type Error = Error

ยง

impl TryFrom<&str> for Scheme

ยง

type Error = ParseError

ยง

impl TryFrom<&str> for Update

ยง

type Error = SparqlSyntaxError

ยง

impl TryFrom<&str> for Update

ยง

type Error = SparqlSyntaxError

ยง

impl TryFrom<&str> for UriTemplateString

ยง

type Error = Error

ยง

impl TryFrom<&String> for PathAndQuery

ยง

impl TryFrom<&String> for Query

ยง

type Error = SparqlSyntaxError

ยง

impl TryFrom<&String> for Query

ยง

type Error = SparqlSyntaxError

ยง

impl TryFrom<&String> for Update

ยง

type Error = SparqlSyntaxError

ยง

impl TryFrom<&String> for Update

ยง

type Error = SparqlSyntaxError

Sourceยง

impl TryFrom<&JsValue> for f64

ยง

impl TryFrom<&CssColor> for A98

ยง

impl TryFrom<&CssColor> for HSL

ยง

impl TryFrom<&CssColor> for HWB

ยง

impl TryFrom<&CssColor> for LAB

ยง

impl TryFrom<&CssColor> for LCH

ยง

impl TryFrom<&CssColor> for OKLAB

ยง

impl TryFrom<&CssColor> for OKLCH

ยง

impl TryFrom<&CssColor> for P3

ยง

impl TryFrom<&CssColor> for ProPhoto

ยง

impl TryFrom<&CssColor> for RGB

ยง

impl TryFrom<&CssColor> for RGBA

ยง

impl TryFrom<&CssColor> for Rec2020

ยง

impl TryFrom<&CssColor> for SRGB

ยง

impl TryFrom<&CssColor> for SRGBLinear

ยง

impl TryFrom<&CssColor> for XYZd50

ยง

impl TryFrom<&CssColor> for XYZd65

ยง

impl TryFrom<&NodeName> for Block

ยง

type Error = Error

ยง

impl TryFrom<&Params> for ParamsString

ยง

type Error = Error

ยง

impl TryFrom<&[u8]> for AssociatedData

ยง

type Error = Error

ยง

impl TryFrom<&[u8]> for KeyId

ยง

type Error = Error

ยง

impl TryFrom<&[u8]> for Output

ยง

type Error = Error

ยง

impl TryFrom<&[u8]> for ReasonPhrase

ยง

type Error = InvalidReasonPhrase

ยง

impl TryFrom<&[u8]> for SectionKind

ยง

impl TryFrom<&[u8]> for SqliteOwnedBuf

ยงErrors

Returns [Error::InvalidArgument] if the slice is empty.

ยง

type Error = Error

ยง

impl TryFrom<&[u8]> for Tag

ยง

type Error = Unspecified

ยง

impl TryFrom<&[u8]> for UriTemplateString

ยง

type Error = Error

Sourceยง

impl TryFrom<(Option<URI>, Option<String>, Option<ArchiveId>, Option<String>, Option<Language>, Option<String>, Option<String>, Option<String>, Option<String>)> for URIComponents

Sourceยง

impl TryFrom<(Option<SymbolURI>, Option<ArchiveId>, Option<String>, Option<String>, Option<String>)> for SymURIComponents

Sourceยง

impl TryFrom<(Option<DocumentURI>, Option<String>, Option<ArchiveId>, Option<String>, Option<Language>, Option<String>)> for DocURIComponents

Sourceยง

impl TryFrom<ParagraphKind> for SearchResultKind

ยง

impl TryFrom<Cow<'_, str>> for Schedule

ยง

type Error = Error

1.59.0 ยท Sourceยง

impl TryFrom<char> for u8

Maps a char with code point in U+0000..=U+00FF to a byte in 0x00..=0xFF with same value, failing if the code point is greater than U+00FF.

See impl From<u8> for char for details on the encoding.

1.74.0 ยท Sourceยง

impl TryFrom<char> for u16

Maps a char with code point in U+0000..=U+FFFF to a u16 in 0x0000..=0xFFFF with same value, failing if the code point is greater than U+FFFF.

This corresponds to the UCS-2 encoding, as specified in ISO/IEC 10646:2003.

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i8> for u8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i8> for u16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i8> for u32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i8> for u64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i8> for u128

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i8> for usize

1.46.0 ยท Sourceยง

impl TryFrom<i8> for NonZero<i8>

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i16> for i8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i16> for u8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i16> for u16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i16> for u32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i16> for u64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i16> for u128

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i16> for usize

1.46.0 ยท Sourceยง

impl TryFrom<i16> for NonZero<i16>

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i32> for i8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i32> for i16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i32> for isize

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i32> for u8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i32> for u16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i32> for u32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i32> for u64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i32> for u128

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i32> for usize

1.46.0 ยท Sourceยง

impl TryFrom<i32> for NonZero<i32>

ยง

impl TryFrom<i32> for DumpableBehavior

ยง

type Error = Errno

ยง

impl TryFrom<i32> for TimingMethod

ยง

type Error = Errno

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i64> for i8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i64> for i16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i64> for i32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i64> for isize

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i64> for u8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i64> for u16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i64> for u32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i64> for u64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i64> for u128

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i64> for usize

1.46.0 ยท Sourceยง

impl TryFrom<i64> for NonZero<i64>

Sourceยง

impl TryFrom<i64> for Number

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for i8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for i16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for i32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for i64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for isize

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for u8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for u16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for u32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for u64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for u128

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<i128> for usize

1.46.0 ยท Sourceยง

impl TryFrom<i128> for NonZero<i128>

Sourceยง

impl TryFrom<i128> for Number

ยง

impl TryFrom<i128> for Decimal

ยง

type Error = TooLargeForDecimalError

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for i8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for i16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for i32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for i64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for i128

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for u8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for u16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for u32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for u64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for u128

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<isize> for usize

1.46.0 ยท Sourceยง

impl TryFrom<isize> for NonZero<isize>

Sourceยง

impl TryFrom<u8> for ArgMode

Sourceยง

impl TryFrom<u8> for SectionLevel

Sourceยง

impl TryFrom<u8> for chrono::month::Month

Sourceยง

impl TryFrom<u8> for Weekday

Any weekday can be represented as an integer from 0 to 6, which equals to Weekday::num_days_from_monday in this implementation. Do not heavily depend on this though; use explicit methods whenever possible.

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u8> for i8

1.46.0 ยท Sourceยง

impl TryFrom<u8> for NonZero<u8>

ยง

impl TryFrom<u8> for GeneralCategory

ยง

type Error = GeneralCategoryOutOfBoundsError

ยง

impl TryFrom<u8> for Month

ยง

type Error = ComponentRange

ยง

impl TryFrom<u8> for RevocationReason

ยง

type Error = Error

ยง

impl TryFrom<u8> for TrieType

ยง

type Error = Error

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u16> for i8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u16> for i16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u16> for isize

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u16> for u8

ยง

impl TryFrom<u16> for StatusCode

1.46.0 ยท Sourceยง

impl TryFrom<u16> for NonZero<u16>

ยง

impl TryFrom<u16> for PatternID

ยง

type Error = PatternIDError

ยง

impl TryFrom<u16> for PatternID

ยง

type Error = PatternIDError

ยง

impl TryFrom<u16> for SmallIndex

ยง

type Error = SmallIndexError

ยง

impl TryFrom<u16> for StateID

ยง

type Error = StateIDError

ยง

impl TryFrom<u16> for StateID

ยง

type Error = StateIDError

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u32> for char

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u32> for i8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u32> for i16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u32> for i32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u32> for isize

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u32> for u8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u32> for u16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u32> for usize

1.46.0 ยท Sourceยง

impl TryFrom<u32> for NonZero<u32>

ยง

impl TryFrom<u32> for EndianMode

ยง

type Error = Errno

ยง

impl TryFrom<u32> for FloatingPointMode

ยง

type Error = Errno

ยง

impl TryFrom<u32> for MachineCheckMemoryCorruptionKillPolicy

ยง

type Error = Errno

ยง

impl TryFrom<u32> for PatternID

ยง

type Error = PatternIDError

ยง

impl TryFrom<u32> for PatternID

ยง

type Error = PatternIDError

ยง

impl TryFrom<u32> for PotentialCodePoint

ยง

impl TryFrom<u32> for SmallIndex

ยง

type Error = SmallIndexError

ยง

impl TryFrom<u32> for SpeculationFeature

ยง

type Error = Errno

ยง

impl TryFrom<u32> for StateID

ยง

type Error = StateIDError

ยง

impl TryFrom<u32> for StateID

ยง

type Error = StateIDError

ยง

impl TryFrom<u32> for TimeStampCounterReadability

ยง

type Error = Errno

ยง

impl TryFrom<u32> for Version

ยง

type Error = Error

Sourceยง

impl TryFrom<u64> for SearchResultKind

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u64> for i8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u64> for i16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u64> for i32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u64> for i64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u64> for isize

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u64> for u8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u64> for u16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u64> for u32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u64> for usize

1.46.0 ยท Sourceยง

impl TryFrom<u64> for NonZero<u64>

Sourceยง

impl TryFrom<u64> for Number

ยง

impl TryFrom<u64> for PatternID

ยง

type Error = PatternIDError

ยง

impl TryFrom<u64> for PatternID

ยง

type Error = PatternIDError

ยง

impl TryFrom<u64> for SmallIndex

ยง

type Error = SmallIndexError

ยง

impl TryFrom<u64> for StateID

ยง

type Error = StateIDError

ยง

impl TryFrom<u64> for StateID

ยง

type Error = StateIDError

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for i8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for i16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for i32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for i64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for i128

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for isize

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for u8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for u16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for u32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for u64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<u128> for usize

1.46.0 ยท Sourceยง

impl TryFrom<u128> for NonZero<u128>

Sourceยง

impl TryFrom<u128> for Number

ยง

impl TryFrom<u128> for Decimal

ยง

type Error = TooLargeForDecimalError

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for i8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for i16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for i32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for i64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for i128

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for isize

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for u8

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for u16

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for u32

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for u64

1.34.0 (const: unstable) ยท Sourceยง

impl TryFrom<usize> for u128

1.46.0 ยท Sourceยง

impl TryFrom<usize> for NonZero<usize>

Sourceยง

impl TryFrom<usize> for Alignment

ยง

impl TryFrom<usize> for PatternID

ยง

type Error = PatternIDError

ยง

impl TryFrom<usize> for PatternID

ยง

type Error = PatternIDError

ยง

impl TryFrom<usize> for SmallIndex

ยง

type Error = SmallIndexError

ยง

impl TryFrom<usize> for StateID

ยง

type Error = StateIDError

ยง

impl TryFrom<usize> for StateID

ยง

type Error = StateIDError

Sourceยง

impl TryFrom<SqlUser> for DBUser

ยง

impl TryFrom<Method> for MethodFilter

ยง

type Error = NoMatchingMethodFilter

ยง

impl TryFrom<Parts> for Uri

ยง

impl TryFrom<BytesMut> for Utf8Bytes

ยง

impl TryFrom<Bytes> for flams_router_vscode::server_fn::axum_export::extract::ws::Utf8Bytes

ยง

impl TryFrom<Bytes> for ReasonPhrase

ยง

type Error = InvalidReasonPhrase

ยง

impl TryFrom<Bytes> for Utf8Bytes

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i8>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i8>> for NonZero<u16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i8>> for NonZero<u32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i8>> for NonZero<u64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i8>> for NonZero<u128>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i8>> for NonZero<usize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i16>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i16>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i16>> for NonZero<u16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i16>> for NonZero<u32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i16>> for NonZero<u64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i16>> for NonZero<u128>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i16>> for NonZero<usize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i32>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i32>> for NonZero<i16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i32>> for NonZero<isize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i32>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i32>> for NonZero<u16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i32>> for NonZero<u32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i32>> for NonZero<u64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i32>> for NonZero<u128>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i32>> for NonZero<usize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i64>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i64>> for NonZero<i16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i64>> for NonZero<i32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i64>> for NonZero<isize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i64>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i64>> for NonZero<u16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i64>> for NonZero<u32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i64>> for NonZero<u64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i64>> for NonZero<u128>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i64>> for NonZero<usize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<i16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<i32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<i64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<isize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<u16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<u32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<u64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<u128>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<i128>> for NonZero<usize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<i16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<i32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<i64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<i128>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<u16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<u32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<u64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<u128>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<isize>> for NonZero<usize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u8>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u16>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u16>> for NonZero<i16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u16>> for NonZero<isize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u16>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u32>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u32>> for NonZero<i16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u32>> for NonZero<i32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u32>> for NonZero<isize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u32>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u32>> for NonZero<u16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u32>> for NonZero<usize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u64>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u64>> for NonZero<i16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u64>> for NonZero<i32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u64>> for NonZero<i64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u64>> for NonZero<isize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u64>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u64>> for NonZero<u16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u64>> for NonZero<u32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u64>> for NonZero<usize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<i16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<i32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<i64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<i128>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<isize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<u16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<u32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<u64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<u128>> for NonZero<usize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<i8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<i16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<i32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<i64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<i128>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<isize>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<u8>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<u16>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<u32>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<u64>

1.49.0 (const: unstable) ยท Sourceยง

impl TryFrom<NonZero<usize>> for NonZero<u128>

Sourceยง

impl TryFrom<NonZero<usize>> for Alignment

ยง

impl TryFrom<Duration> for DayTimeDuration

ยง

type Error = DurationOverflowError

ยง

impl TryFrom<Duration> for Duration

ยง

type Error = ConversionRange

ยง

impl TryFrom<Duration> for Duration

ยง

type Error = DurationOverflowError

ยง

impl TryFrom<Duration> for Timespec

Sourceยง

impl TryFrom<ByteString> for String

1.85.0 ยท Sourceยง

impl TryFrom<CString> for String

ยง

impl TryFrom<String> for Env

ยง

impl TryFrom<String> for ReloadWSProtocol

ยง

impl TryFrom<String> for HeaderName

ยง

impl TryFrom<String> for HeaderValue

ยง

impl TryFrom<String> for Uri

ยง

impl TryFrom<String> for Authority

ยง

impl TryFrom<String> for PathAndQuery

Sourceยง

impl TryFrom<String> for Uuid

ยง

impl TryFrom<String> for DnsName<'static>

ยง

type Error = InvalidDnsNameError

ยง

impl TryFrom<String> for ReasonPhrase

ยง

type Error = InvalidReasonPhrase

ยง

impl TryFrom<String> for Regex

ยง

type Error = Error

ยง

impl TryFrom<String> for Regex

ยง

type Error = Error

ยง

impl TryFrom<String> for Schedule

ยง

type Error = Error

ยง

impl TryFrom<String> for ServerName<'static>

ยง

type Error = InvalidDnsNameError

ยง

impl TryFrom<String> for UriTemplateString

ยง

type Error = CreationError<String>

ยง

impl TryFrom<Vec<u8>> for flams_router_vscode::server_fn::axum_export::extract::ws::Utf8Bytes

ยง

impl TryFrom<Vec<u8>> for HeaderName

ยง

impl TryFrom<Vec<u8>> for HeaderValue

ยง

impl TryFrom<Vec<u8>> for Uri

ยง

impl TryFrom<Vec<u8>> for Authority

ยง

impl TryFrom<Vec<u8>> for PathAndQuery

1.87.0 ยท Sourceยง

impl TryFrom<Vec<u8>> for String

Sourceยง

impl TryFrom<Vec<u8>> for Uuid

ยง

impl TryFrom<Vec<u8>> for PrivateKeyDer<'_>

ยง

type Error = &'static str

ยง

impl TryFrom<Vec<u8>> for ReasonPhrase

ยง

type Error = InvalidReasonPhrase

ยง

impl TryFrom<Vec<u8>> for Utf8Bytes

ยง

impl TryFrom<TcpListener> for TcpListener

ยง

impl TryFrom<TcpStream> for TcpStream

ยง

impl TryFrom<UdpSocket> for UdpSocket

ยง

impl TryFrom<UnixDatagram> for UnixDatagram

ยง

impl TryFrom<UnixListener> for UnixListener

ยง

impl TryFrom<UnixStream> for UnixStream

ยง

impl TryFrom<PathBuf> for Utf8PathBuf

ยง

type Error = FromPathBufError

Sourceยง

impl TryFrom<BigInt> for i64

Sourceยง

impl TryFrom<BigInt> for i128

Sourceยง

impl TryFrom<BigInt> for u64

Sourceยง

impl TryFrom<BigInt> for u128

Sourceยง

impl TryFrom<Uuid> for NonNilUuid

Sourceยง

impl TryFrom<JsValue> for f64

Sourceยง

impl TryFrom<JsValue> for i64

Sourceยง

impl TryFrom<JsValue> for i128

Sourceยง

impl TryFrom<JsValue> for u64

Sourceยง

impl TryFrom<JsValue> for u128

Sourceยง

impl TryFrom<JsValue> for String

ยง

impl TryFrom<JsValue> for JsError

ยง

type Error = NotJsError

ยง

impl TryFrom<WebSocket> for WebSocket

ยง

type Error = JsError

ยง

impl TryFrom<AggregationForDeserialization> for Aggregation

ยง

impl TryFrom<Angle> for f32

ยง

impl TryFrom<Angle> for Length

ยง

impl TryFrom<Angle> for LengthValue

ยง

impl TryFrom<Angle> for Percentage

ยง

impl TryFrom<Angle> for Time

ยง

impl TryFrom<BorrowedFormatItem<'_>> for Component

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Calc<Angle>> for Angle

ยง

impl TryFrom<Calc<Percentage>> for Percentage

ยง

impl TryFrom<Calc<Time>> for Time

ยง

impl TryFrom<CssColor> for A98

ยง

impl TryFrom<CssColor> for HSL

ยง

impl TryFrom<CssColor> for HWB

ยง

impl TryFrom<CssColor> for LAB

ยง

impl TryFrom<CssColor> for LCH

ยง

impl TryFrom<CssColor> for OKLAB

ยง

impl TryFrom<CssColor> for OKLCH

ยง

impl TryFrom<CssColor> for P3

ยง

impl TryFrom<CssColor> for ProPhoto

ยง

impl TryFrom<CssColor> for RGB

ยง

impl TryFrom<CssColor> for RGBA

ยง

impl TryFrom<CssColor> for Rec2020

ยง

impl TryFrom<CssColor> for SRGB

ยง

impl TryFrom<CssColor> for SRGBLinear

ยง

impl TryFrom<CssColor> for XYZd50

ยง

impl TryFrom<CssColor> for XYZd65

ยง

impl TryFrom<DatasetFormat> for GraphFormat

ยง

impl TryFrom<Date> for DateTime

Conversion according to XPath cast rules.

ยง

type Error = DateTimeOverflowError

ยง

impl TryFrom<Date> for GYear

Conversion according to XPath cast rules.

ยง

type Error = DateTimeOverflowError

ยง

impl TryFrom<DateTime> for Date

Conversion according to XPath cast rules.

ยง

type Error = DateTimeOverflowError

ยง

impl TryFrom<DateTime> for GYear

Conversion according to XPath cast rules.

ยง

type Error = DateTimeOverflowError

ยง

impl TryFrom<DateTime> for GYearMonth

Conversion according to XPath cast rules.

ยง

type Error = DateTimeOverflowError

ยง

impl TryFrom<DayTimeDuration> for flams_router_vscode::server_fn::inventory::core::time::Duration

ยง

type Error = DurationOverflowError

ยง

impl TryFrom<DayTimeDuration> for TimezoneOffset

ยง

type Error = InvalidTimezoneError

ยง

impl TryFrom<Decimal> for Integer

ยง

type Error = TooLargeForIntegerError

ยง

impl TryFrom<Double> for Decimal

ยง

type Error = TooLargeForDecimalError

ยง

impl TryFrom<Double> for Integer

ยง

type Error = TooLargeForIntegerError

ยง

impl TryFrom<Duration> for flams_router_vscode::server_fn::inventory::core::time::Duration

ยง

type Error = ConversionRange

ยง

impl TryFrom<Duration> for DayTimeDuration

ยง

type Error = DurationOverflowError

ยง

impl TryFrom<Duration> for TimezoneOffset

ยง

type Error = InvalidTimezoneError

ยง

impl TryFrom<Duration> for YearMonthDuration

ยง

type Error = DurationOverflowError

ยง

impl TryFrom<Error> for ComponentRange

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Error> for ConversionRange

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Error> for DifferentVariant

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Error> for Format

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Error> for InvalidFormatDescription

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Error> for InvalidVariant

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Error> for Parse

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Error> for ParseFromDescription

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Error> for TryFromParsed

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Float> for Decimal

ยง

type Error = TooLargeForDecimalError

ยง

impl TryFrom<Float> for Integer

ยง

type Error = TooLargeForIntegerError

ยง

impl TryFrom<Format> for Error

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Format> for ComponentRange

ยง

type Error = DifferentVariant

ยง

impl TryFrom<GYearMonth> for GYear

ยง

type Error = DateTimeOverflowError

ยง

impl TryFrom<GraphFormat> for DatasetFormat

ยง

impl TryFrom<GraphNamePattern> for GraphName

ยง

impl TryFrom<GroundTerm> for GroundSubject

ยง

impl TryFrom<NamedNodePattern> for NamedNode

ยง

impl TryFrom<NodeBlock> for Block

ยง

impl TryFrom<OwnedFormatItem> for Vec<OwnedFormatItem>

ยง

type Error = DifferentVariant

ยง

impl TryFrom<OwnedFormatItem> for Component

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Params> for ParamsString

ยง

type Error = Error

ยง

impl TryFrom<ParamsBuilder> for Params

ยง

type Error = Error

ยง

impl TryFrom<Parse> for ParseFromDescription

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Parse> for TryFromParsed

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Parsed> for Date

ยง

type Error = TryFromParsed

ยง

impl TryFrom<Parsed> for OffsetDateTime

ยง

type Error = TryFromParsed

ยง

impl TryFrom<Parsed> for PrimitiveDateTime

ยง

type Error = TryFromParsed

ยง

impl TryFrom<Parsed> for Time

ยง

type Error = TryFromParsed

ยง

impl TryFrom<Parsed> for UtcDateTime

ยง

type Error = TryFromParsed

ยง

impl TryFrom<Parsed> for UtcOffset

ยง

type Error = TryFromParsed

ยง

impl TryFrom<PotentialCodePoint> for char

ยง

impl TryFrom<Quad> for GroundQuad

ยง

impl TryFrom<QuadPattern> for GroundQuadPattern

ยง

impl TryFrom<QuadPattern> for Quad

ยง

impl TryFrom<Request> for flams_router_vscode::server_fn::axum_export::http::Request<Body>

ยง

type Error = Error

ยง

impl TryFrom<RequestBuilder> for flams_router_vscode::server_fn::request::browser::Request

ยง

type Error = Error

ยง

impl TryFrom<SocketAddrAny> for SocketAddr

ยง

type Error = Errno

ยง

impl TryFrom<SocketAddrAny> for SocketAddrV4

ยง

type Error = Errno

ยง

impl TryFrom<SocketAddrAny> for SocketAddrV6

ยง

type Error = Errno

ยง

type Error = Errno

ยง

impl TryFrom<SocketAddrAny> for SocketAddrUnix

ยง

type Error = Errno

ยง

impl TryFrom<SocketAddrAny> for SocketAddrXdp

ยง

type Error = Errno

ยง

impl TryFrom<Subject> for GroundSubject

ยง

impl TryFrom<Term> for BlankNode

ยง

type Error = TryFromTermError

ยง

impl TryFrom<Term> for GroundTerm

ยง

impl TryFrom<Term> for Literal

ยง

type Error = TryFromTermError

ยง

impl TryFrom<Term> for NamedNode

ยง

type Error = TryFromTermError

ยง

impl TryFrom<Term> for Subject

ยง

type Error = TryFromTermError

ยง

impl TryFrom<TermPattern> for GroundTermPattern

ยง

impl TryFrom<TermPattern> for Subject

ยง

impl TryFrom<TermPattern> for Term

ยง

impl TryFrom<Timespec> for flams_router_vscode::server_fn::inventory::core::time::Duration

ยง

impl TryFrom<Triple> for GroundTriple

ยง

impl TryFrom<TriplePattern> for GroundTriplePattern

ยง

impl TryFrom<TriplePattern> for Triple

ยง

impl TryFrom<TryFromParsed> for ComponentRange

ยง

type Error = DifferentVariant

ยง

impl TryFrom<Value> for CurrencyType

ยง

type Error = PreferencesParseError

ยง

impl TryFrom<Value> for NumberingSystem

ยง

type Error = PreferencesParseError

ยง

impl TryFrom<Value> for RegionOverride

ยง

type Error = PreferencesParseError

ยง

impl TryFrom<Value> for RegionalSubdivision

ยง

type Error = PreferencesParseError

ยง

impl TryFrom<Value> for TimeZoneShortId

ยง

type Error = PreferencesParseError

ยง

impl<'a> TryFrom<&'a str> for &'a UriTemplateStr

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a str> for HeaderName

ยง

impl<'a> TryFrom<&'a str> for HeaderValue

ยง

impl<'a> TryFrom<&'a str> for Method

ยง

impl<'a> TryFrom<&'a str> for StatusCode

ยง

impl<'a> TryFrom<&'a str> for Uri

ยง

impl<'a> TryFrom<&'a str> for Authority

ยง

impl<'a> TryFrom<&'a str> for PathAndQuery

ยง

impl<'a> TryFrom<&'a str> for flams_router_vscode::server_fn::axum_export::http::uri::Scheme

Sourceยง

impl<'a> TryFrom<&'a str> for Url

ยง

impl<'a> TryFrom<&'a str> for DnsName<'a>

ยง

type Error = InvalidDnsNameError

ยง

impl<'a> TryFrom<&'a str> for Ident<'a>

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a str> for PasswordHash<'a>

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a str> for Salt<'a>

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a str> for ServerName<'a>

Attempt to make a ServerName from a string by parsing as a DNS name or IP address.

ยง

type Error = InvalidDnsNameError

ยง

impl<'a> TryFrom<&'a str> for Value<'a>

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a Uri> for Uri

Sourceยง

impl<'a> TryFrom<&'a ByteStr> for &'a str

Sourceยง

impl<'a> TryFrom<&'a ByteStr> for String

Sourceยง

impl<'a> TryFrom<&'a ByteString> for &'a str

ยง

impl<'a> TryFrom<&'a String> for HeaderName

ยง

impl<'a> TryFrom<&'a String> for HeaderValue

ยง

impl<'a> TryFrom<&'a String> for Uri

1.72.0 ยท Sourceยง

impl<'a> TryFrom<&'a OsStr> for &'a str

ยง

impl<'a> TryFrom<&'a Path> for &'a Utf8Path

Converts a Path to a [Utf8Path].

Returns [FromPathError] if the path is not valid UTF-8.

ยงExamples

use camino::Utf8Path;
use std::convert::TryFrom;
use std::ffi::OsStr;
use std::os::unix::ffi::OsStrExt;
use std::path::Path;

let unicode_path = Path::new("/valid/unicode");
<&Utf8Path>::try_from(unicode_path).expect("valid Unicode path succeeded");

// Paths on Unix can be non-UTF-8.
let non_unicode_str = OsStr::from_bytes(b"\xFF\xFF\xFF");
let non_unicode_path = Path::new(non_unicode_str);
assert!(<&Utf8Path>::try_from(non_unicode_path).is_err(), "non-Unicode path failed");
ยง

type Error = FromPathError

ยง

impl<'a> TryFrom<&'a AnyConnectOptions> for SqliteConnectOptions

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a CertificateDer<'a>> for EndEntityCert<'a>

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a CertificateDer<'a>> for ParsedCertificate<'a>

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a PasswordHash<'a>> for Params

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a SqliteColumn> for AnyColumn

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a SqliteRow> for AnyRow

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a SqliteTypeInfo> for AnyTypeInfo

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a SubjectPublicKeyInfoDer<'a>> for RawPublicKeyEntity<'a>

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a [u8]> for &'a UriTemplateStr

ยง

type Error = Error

ยง

impl<'a> TryFrom<&'a [u8]> for HeaderName

ยง

impl<'a> TryFrom<&'a [u8]> for HeaderValue

ยง

impl<'a> TryFrom<&'a [u8]> for Method

ยง

impl<'a> TryFrom<&'a [u8]> for StatusCode

ยง

impl<'a> TryFrom<&'a [u8]> for Uri

ยง

impl<'a> TryFrom<&'a [u8]> for Authority

ยง

impl<'a> TryFrom<&'a [u8]> for PathAndQuery

ยง

impl<'a> TryFrom<&'a [u8]> for flams_router_vscode::server_fn::axum_export::http::uri::Scheme

ยง

impl<'a> TryFrom<&'a [u8]> for DnsName<'a>

ยง

type Error = InvalidDnsNameError

ยง

impl<'a> TryFrom<&'a [u8]> for PrivateKeyDer<'a>

ยง

type Error = &'static str

ยง

impl<'a> TryFrom<&'a [u8]> for ServerName<'a>

ยง

type Error = InvalidDnsNameError

Sourceยง

impl<'a> TryFrom<&'a mut ByteStr> for &'a mut str

ยง

impl<'a> TryFrom<&Value<'a>> for u32

ยง

type Error = Error

ยง

impl<'a> TryFrom<BorrowedFormatItem<'a>> for &[BorrowedFormatItem<'a>]

ยง

type Error = DifferentVariant

ยง

impl<'a> TryFrom<Ident<'a>> for Algorithm

ยง

type Error = Error

ยง

impl<'a> TryFrom<Item<'a>> for BorrowedFormatItem<'a>

ยง

type Error = Error

ยง

impl<'a> TryFrom<Value<'a>> for u32

ยง

type Error = Error

Sourceยง

impl<'a, C, T, const N: usize> TryFrom<&'a [T]> for &'a Alpha<C, T>
where Alpha<C, T>: ArrayCast<Array = [T; N]>,

Sourceยง

type Error = <&'a [T; N] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, C, T, const N: usize> TryFrom<&'a mut [T]> for &'a mut Alpha<C, T>
where Alpha<C, T>: ArrayCast<Array = [T; N]>,

Sourceยง

type Error = <&'a mut [T; N] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, C, const N: usize> TryFrom<&'a [<C as Premultiply>::Scalar]> for &'a PreAlpha<C>
where C: Premultiply, PreAlpha<C>: ArrayCast<Array = [<C as Premultiply>::Scalar; N]>,

Sourceยง

type Error = <&'a [<C as Premultiply>::Scalar; N] as TryFrom<&'a [<C as Premultiply>::Scalar]>>::Error

Sourceยง

impl<'a, C, const N: usize> TryFrom<&'a mut [<C as Premultiply>::Scalar]> for &'a mut PreAlpha<C>
where C: Premultiply, PreAlpha<C>: ArrayCast<Array = [<C as Premultiply>::Scalar; N]>,

Sourceยง

type Error = <&'a mut [<C as Premultiply>::Scalar; N] as TryFrom<&'a mut [<C as Premultiply>::Scalar]>>::Error

ยง

impl<'a, K, V, S, T> TryFrom<&'a HashMap<K, V, S>> for HeaderMap<T>

Try to convert a HashMap into a HeaderMap.

ยงExamples

use std::collections::HashMap;
use std::convert::TryInto;
use http::HeaderMap;

let mut map = HashMap::new();
map.insert("X-Custom-Header".to_string(), "my value".to_string());

let headers: HeaderMap = (&map).try_into().expect("valid headers");
assert_eq!(headers["X-Custom-Header"], "my value");
Sourceยง

impl<'a, O, T, const N: usize> TryFrom<&'a [T]> for &'a Packed<O, [T; N]>

Sourceยง

type Error = <&'a [T; N] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, O, T, const N: usize> TryFrom<&'a mut [T]> for &'a mut Packed<O, [T; N]>

Sourceยง

type Error = <&'a mut [T; N] as TryFrom<&'a mut [T]>>::Error

ยง

impl<'a, S> TryFrom<&'a str> for &'a RiAbsoluteStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a str> for &'a RiFragmentStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a str> for &'a RiQueryStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a str> for &'a RiReferenceStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a str> for &'a RiRelativeStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a str> for &'a RiStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a RiReferenceStr<S>> for &'a RiAbsoluteStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a RiReferenceStr<S>> for &'a RiRelativeStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a RiReferenceStr<S>> for &'a RiStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a RiStr<S>> for &'a RiAbsoluteStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a [u8]> for &'a RiAbsoluteStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a [u8]> for &'a RiFragmentStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a [u8]> for &'a RiQueryStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a [u8]> for &'a RiReferenceStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a [u8]> for &'a RiRelativeStr<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<'a, S> TryFrom<&'a [u8]> for &'a RiStr<S>
where S: Spec,

ยง

type Error = Error

Sourceยง

impl<'a, S, T> TryFrom<&'a [T]> for &'a Hsl<S, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, S, T> TryFrom<&'a [T]> for &'a Hsv<S, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, S, T> TryFrom<&'a [T]> for &'a Hwb<S, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, S, T> TryFrom<&'a [T]> for &'a Luma<S, T>

Sourceยง

type Error = <&'a [T; 1] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, S, T> TryFrom<&'a [T]> for &'a Rgb<S, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, S, T> TryFrom<&'a mut [T]> for &'a mut Hsl<S, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, S, T> TryFrom<&'a mut [T]> for &'a mut Hsv<S, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, S, T> TryFrom<&'a mut [T]> for &'a mut Hwb<S, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, S, T> TryFrom<&'a mut [T]> for &'a mut Luma<S, T>

Sourceยง

type Error = <&'a mut [T; 1] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, S, T> TryFrom<&'a mut [T]> for &'a mut Rgb<S, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Cam16Jch<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Cam16Jmh<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Cam16Jsh<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Cam16Qch<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Cam16Qmh<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Cam16Qsh<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Cam16UcsJab<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Cam16UcsJmh<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Okhsl<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Okhsv<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Okhwb<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Oklab<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a [T]> for &'a Oklch<T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Cam16Jch<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Cam16Jmh<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Cam16Jsh<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Cam16Qch<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Cam16Qmh<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Cam16Qsh<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Cam16UcsJab<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Cam16UcsJmh<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Okhsl<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Okhsv<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Okhwb<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Oklab<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, T> TryFrom<&'a mut [T]> for &'a mut Oklch<T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

1.34.0 ยท Sourceยง

impl<'a, T, const N: usize> TryFrom<&'a [T]> for &'a [T; N]

Tries to create an array ref &[T; N] from a slice ref &[T]. Succeeds if slice.len() == N.

let bytes: [u8; 3] = [1, 0, 2];

let bytes_head: &[u8; 2] = <&[u8; 2]>::try_from(&bytes[0..2]).unwrap();
assert_eq!(1, u16::from_le_bytes(*bytes_head));

let bytes_tail: &[u8; 2] = bytes[1..3].try_into().unwrap();
assert_eq!(512, u16::from_le_bytes(*bytes_tail));
1.34.0 ยท Sourceยง

impl<'a, T, const N: usize> TryFrom<&'a mut [T]> for &'a mut [T; N]

Tries to create a mutable array ref &mut [T; N] from a mutable slice ref &mut [T]. Succeeds if slice.len() == N.

let mut bytes: [u8; 3] = [1, 0, 2];

let bytes_head: &mut [u8; 2] = <&mut [u8; 2]>::try_from(&mut bytes[0..2]).unwrap();
assert_eq!(1, u16::from_le_bytes(*bytes_head));

let bytes_tail: &mut [u8; 2] = (&mut bytes[1..3]).try_into().unwrap();
assert_eq!(512, u16::from_le_bytes(*bytes_tail));
Sourceยง

impl<'a, Wp, T> TryFrom<&'a [T]> for &'a Hsluv<Wp, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a [T]> for &'a Lab<Wp, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a [T]> for &'a Lch<Wp, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a [T]> for &'a Lchuv<Wp, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a [T]> for &'a Luv<Wp, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a [T]> for &'a Xyz<Wp, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a [T]> for &'a Yxy<Wp, T>

Sourceยง

type Error = <&'a [T; 3] as TryFrom<&'a [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a mut [T]> for &'a mut Hsluv<Wp, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a mut [T]> for &'a mut Lab<Wp, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a mut [T]> for &'a mut Lch<Wp, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a mut [T]> for &'a mut Lchuv<Wp, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a mut [T]> for &'a mut Luv<Wp, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a mut [T]> for &'a mut Xyz<Wp, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

Sourceยง

impl<'a, Wp, T> TryFrom<&'a mut [T]> for &'a mut Yxy<Wp, T>

Sourceยง

type Error = <&'a mut [T; 3] as TryFrom<&'a mut [T]>>::Error

ยง

impl<'i> TryFrom<&Token<'i>> for Angle

ยง

impl<'i> TryFrom<&Token<'i>> for LengthValue

ยง

impl<'i> TryFrom<&Token<'i>> for Resolution

ยง

impl<'i> TryFrom<&Token<'i>> for Time

ยง

impl<'ns> TryFrom<ResolveResult<'ns>> for Option<Namespace<'ns>>

ยง

type Error = NamespaceError

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for &'v str

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for bool

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for char

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for f64

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for i8

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for i16

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for i32

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for i64

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for i128

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for isize

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for u8

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for u16

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for u32

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for u64

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for u128

Sourceยง

impl<'v> TryFrom<ValueBag<'v>> for usize

ยง

impl<E, D> TryFrom<Angle> for DimensionPercentage<D>
where D: TryFrom<Angle, Error = E>,

ยง

type Error = E

ยง

impl<O> TryFrom<i32> for I16<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<i64> for I16<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<i64> for I32<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<i128> for I16<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<i128> for I32<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<i128> for I64<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<isize> for I16<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<u32> for U16<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<u64> for U16<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<u64> for U32<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<u128> for U16<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<u128> for U32<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<u128> for U64<O>
where O: ByteOrder,

ยง

impl<O> TryFrom<usize> for U16<O>
where O: ByteOrder,

ยง

impl<O, P> TryFrom<I32<P>> for I16<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<I64<P>> for I16<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<I64<P>> for I32<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<I128<P>> for I16<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<I128<P>> for I32<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<I128<P>> for I64<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<Isize<P>> for I16<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<U32<P>> for U16<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<U64<P>> for U16<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<U64<P>> for U32<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<U128<P>> for U16<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<U128<P>> for U32<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<U128<P>> for U64<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<O, P> TryFrom<Usize<P>> for U16<O>
where O: ByteOrder, P: ByteOrder,

ยง

impl<S> TryFrom<&str> for RiAbsoluteString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&str> for RiFragmentString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&str> for RiQueryString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&str> for RiReferenceString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&str> for RiRelativeString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&str> for RiString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&[u8]> for RiAbsoluteString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&[u8]> for RiFragmentString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&[u8]> for RiQueryString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&[u8]> for RiReferenceString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&[u8]> for RiRelativeString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<&[u8]> for RiString<S>
where S: Spec,

ยง

type Error = Error

ยง

impl<S> TryFrom<String> for RiAbsoluteString<S>
where S: Spec,

ยง

type Error = CreationError<String>

ยง

impl<S> TryFrom<String> for RiFragmentString<S>
where S: Spec,

ยง

type Error = CreationError<String>

ยง

impl<S> TryFrom<String> for RiQueryString<S>
where S: Spec,

ยง

type Error = CreationError<String>

ยง

impl<S> TryFrom<String> for RiReferenceString<S>
where S: Spec,

ยง

type Error = CreationError<String>

ยง

impl<S> TryFrom<String> for RiRelativeString<S>
where S: Spec,

ยง

type Error = CreationError<String>

ยง

impl<S> TryFrom<String> for RiString<S>
where S: Spec,

ยง

type Error = CreationError<String>

ยง

impl<S> TryFrom<RiReferenceString<S>> for RiAbsoluteString<S>
where S: Spec,

ยง

type Error = CreationError<RiReferenceString<S>>

ยง

impl<S> TryFrom<RiReferenceString<S>> for RiRelativeString<S>
where S: Spec,

ยง

type Error = CreationError<RiReferenceString<S>>

ยง

impl<S> TryFrom<RiReferenceString<S>> for RiString<S>
where S: Spec,

ยง

type Error = CreationError<RiReferenceString<S>>

ยง

impl<S> TryFrom<RiString<S>> for RiAbsoluteString<S>
where S: Spec,

ยง

type Error = CreationError<RiString<S>>

ยง

impl<S, C> TryFrom<Expanded<'_, S, C>> for RiAbsoluteString<S>
where S: Spec, C: Context,

ยง

type Error = CreationError<String>

ยง

impl<S, C> TryFrom<Expanded<'_, S, C>> for RiReferenceString<S>
where S: Spec, C: Context,

ยง

type Error = CreationError<String>

ยง

impl<S, C> TryFrom<Expanded<'_, S, C>> for RiRelativeString<S>
where S: Spec, C: Context,

ยง

type Error = CreationError<String>

ยง

impl<S, C> TryFrom<Expanded<'_, S, C>> for RiString<S>
where S: Spec, C: Context,

ยง

type Error = CreationError<String>

ยง

impl<T> TryFrom<Request<T>> for Request
where T: Into<Body>,

ยง

type Error = Error

ยง

impl<T> TryFrom<Request<T>> for Request
where T: Into<Body>,

ยง

type Error = Error

Sourceยง

impl<T> TryFrom<Dh<T>> for PKey<T>

Sourceยง

impl<T> TryFrom<Dsa<T>> for PKey<T>

Sourceยง

impl<T> TryFrom<EcKey<T>> for PKey<T>

Sourceยง

impl<T> TryFrom<PKey<T>> for Dh<T>

Sourceยง

impl<T> TryFrom<PKey<T>> for Dsa<T>

Sourceยง

impl<T> TryFrom<PKey<T>> for EcKey<T>

Sourceยง

impl<T> TryFrom<PKey<T>> for Rsa<T>

Sourceยง

impl<T> TryFrom<Rsa<T>> for PKey<T>

ยง

impl<T> TryFrom<Arc<T>> for UniqueArc<T>
where T: ?Sized,

ยง

type Error = Arc<T>

ยง

impl<T> TryFrom<IriRef<T>> for Iri<T>
where T: Deref<Target = str>,

ยง

type Error = IriParseError

1.43.0 ยท Sourceยง

impl<T, A, const N: usize> TryFrom<Rc<[T], A>> for Rc<[T; N], A>
where A: Allocator,

1.43.0 ยท Sourceยง

impl<T, A, const N: usize> TryFrom<Arc<[T], A>> for Arc<[T; N], A>
where A: Allocator,

1.48.0 ยท Sourceยง

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

Sourceยง

type Error = Vec<T, A>

ยง

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

ยง

type Error = Box<[T], A>

ยง

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

ยง

type Error = Vec<T, A>

1.34.0 (const: unstable) ยท Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

1.34.0 ยท Sourceยง

impl<T, const N: usize> TryFrom<&[T]> for [T; N]
where T: Copy,

Tries to create an array [T; N] by copying from a slice &[T]. Succeeds if slice.len() == N.

let bytes: [u8; 3] = [1, 0, 2];

let bytes_head: [u8; 2] = <[u8; 2]>::try_from(&bytes[0..2]).unwrap();
assert_eq!(1, u16::from_le_bytes(bytes_head));

let bytes_tail: [u8; 2] = bytes[1..3].try_into().unwrap();
assert_eq!(512, u16::from_le_bytes(bytes_tail));
Sourceยง

impl<T, const N: usize> TryFrom<&[T]> for Simd<T, N>

1.59.0 ยท Sourceยง

impl<T, const N: usize> TryFrom<&mut [T]> for [T; N]
where T: Copy,

Tries to create an array [T; N] by copying from a mutable slice &mut [T]. Succeeds if slice.len() == N.

let mut bytes: [u8; 3] = [1, 0, 2];

let bytes_head: [u8; 2] = <[u8; 2]>::try_from(&mut bytes[0..2]).unwrap();
assert_eq!(1, u16::from_le_bytes(bytes_head));

let bytes_tail: [u8; 2] = (&mut bytes[1..3]).try_into().unwrap();
assert_eq!(512, u16::from_le_bytes(bytes_tail));
Sourceยง

impl<T, const N: usize> TryFrom<&mut [T]> for Simd<T, N>

1.43.0 ยท Sourceยง

impl<T, const N: usize> TryFrom<Box<[T]>> for alloc::boxed::Box<[T; N]>

1.66.0 ยท Sourceยง

impl<T, const N: usize> TryFrom<Vec<T>> for alloc::boxed::Box<[T; N]>

Sourceยง

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

Sourceยง

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

ยง

impl<const MIN: i8, const MAX: i8> TryFrom<i8> for RangedI8<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: i16, const MAX: i16> TryFrom<i16> for RangedI16<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: i32, const MAX: i32> TryFrom<i32> for RangedI32<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: i64, const MAX: i64> TryFrom<i64> for RangedI64<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: i128, const MAX: i128> TryFrom<i128> for RangedI128<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: isize, const MAX: isize> TryFrom<isize> for RangedIsize<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: u8, const MAX: u8> TryFrom<u8> for RangedU8<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: u16, const MAX: u16> TryFrom<u16> for RangedU16<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: u32, const MAX: u32> TryFrom<u32> for RangedU32<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: u64, const MAX: u64> TryFrom<u64> for RangedU64<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: u128, const MAX: u128> TryFrom<u128> for RangedU128<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const MIN: usize, const MAX: usize> TryFrom<usize> for RangedUsize<MIN, MAX>

ยง

type Error = TryFromIntError

ยง

impl<const N: usize> TryFrom<TinyAsciiStr<N>> for Subtag

ยง

type Error = ParseError