pub unsafe trait TrustedItem<Array: TrustedContainer<Item = Self> + ?Sized> {
type Unit;
// Required methods
fn vet<'id, I: Idx>(
idx: I,
container: &Container<'id, Array>,
) -> Result<Index<'id, I, Unknown>, IndexError>;
fn after<'id, I: Idx>(
this: Index<'id, I, NonEmpty>,
container: &Container<'id, Array>,
) -> Index<'id, I, Unknown>;
fn advance<'id, I: Idx>(
this: Index<'id, I, NonEmpty>,
container: &Container<'id, Array>,
) -> Option<Index<'id, I, NonEmpty>>;
}Expand description
An item within a trusted container.
Required Associated Types§
Required Methods§
Sourcefn vet<'id, I: Idx>(
idx: I,
container: &Container<'id, Array>,
) -> Result<Index<'id, I, Unknown>, IndexError>
fn vet<'id, I: Idx>( idx: I, container: &Container<'id, Array>, ) -> Result<Index<'id, I, Unknown>, IndexError>
Vet an index for being on item boundaries.
The index for the end of the container should pass. This function does not imply a nonempty proof.
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 TrustedItem<String> for Character
Available on crate feature std only.
impl TrustedItem<String> for Character
Available on crate feature
std only.Source§impl<T: TrustedItem<[T]>> TrustedItem<Vec<T>> for T
Available on crate feature std only.
impl<T: TrustedItem<[T]>> TrustedItem<Vec<T>> for T
Available on crate feature
std only.Source§impl<T: TrustedItem<Array> + ?Sized, Array: TrustedContainer<Item = T> + ?Sized> TrustedItem<&Array> for T
impl<T: TrustedItem<Array> + ?Sized, Array: TrustedContainer<Item = T> + ?Sized> TrustedItem<&Array> for T
type Unit = <T as TrustedItem<Array>>::Unit
Source§impl<T: TrustedItem<Array> + ?Sized, Array: TrustedContainer<Item = T> + ?Sized> TrustedItem<Box<Array>> for T
Available on crate feature std only.
impl<T: TrustedItem<Array> + ?Sized, Array: TrustedContainer<Item = T> + ?Sized> TrustedItem<Box<Array>> for T
Available on crate feature
std only.