SrcTarget

Trait SrcTarget 

Source
pub trait SrcTarget: SealedSrcTarget {
    type Item: Sized;
}
Expand description

A sealed trait to encode types that can can be used in the Src-family of pointers.

Either Self: Sized or Self: SrcSlice.

Required Associated Types§

Source

type Item: Sized

The type of each element of a Src<Self>.

  • Where Self: Sized: Self::Item = Self
  • Where Self = [T]: Self::Item = T
  • Where Self = str: Self::Item = u8 (because a str is just a [u8] which must be UTF-8)

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.

Implementations on Foreign Types§

Source§

impl SrcTarget for str

Source§

impl<T> SrcTarget for [T]

Source§

type Item = T

Implementors§

Source§

impl<T> SrcTarget for T

Source§

type Item = T