std::ops::CoerceUnsized - Rust
Description: API documentation for the Rust `CoerceUnsized` trait in crate `std`.
Keywords: rust, rustlang, rust-lang, CoerceUnsized

# Trait std::ops::CoerceUnsized [−] [src]

    pub trait CoerceUnsized<T> { }

Unstable (`coerce_unsized` #27732)

Trait that indicates that this is a pointer or a wrapper for one, where unsizing can be performed on the pointee.

## Implementors

- `impl<T, U> CoerceUnsized<NonZero<U>> for NonZero<T> where T: Zeroable + CoerceUnsized<U>, U: Zeroable`
- `impl<T, U> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<T, U> CoerceUnsized<Shared<U>> for Shared<T> where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<'a, T, U> CoerceUnsized<&'a mut U> for &'a mut T where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<'a, 'b, T, U> CoerceUnsized<&'a U> for &'b mut T where 'b: 'a, T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<'a, T, U> CoerceUnsized<*mut U> for &'a mut T where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<'a, T, U> CoerceUnsized<*const U> for &'a mut T where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<'a, 'b, T, U> CoerceUnsized<&'a U> for &'b T where 'b: 'a, T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<'a, T, U> CoerceUnsized<*const U> for &'a T where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<T, U> CoerceUnsized<*mut U> for *mut T where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<T, U> CoerceUnsized<*const U> for *mut T where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<T, U> CoerceUnsized<*const U> for *const T where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<T, U> CoerceUnsized<Cell<U>> for Cell<T> where T: CoerceUnsized<U>`
- `impl<T, U> CoerceUnsized<RefCell<U>> for RefCell<T> where T: CoerceUnsized<U>`
- `impl<'b, T, U> CoerceUnsized<Ref<'b, U>> for Ref<'b, T> where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<'b, T, U> CoerceUnsized<RefMut<'b, U>> for RefMut<'b, T> where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<T, U> CoerceUnsized<UnsafeCell<U>> for UnsafeCell<T> where T: CoerceUnsized<U>`
- `impl<T, U> CoerceUnsized<Box<U>> for Box<T> where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<T, U> CoerceUnsized<Arc<U>> for Arc<T> where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<T, U> CoerceUnsized<Weak<U>> for Weak<T> where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<T, U> CoerceUnsized<Rc<U>> for Rc<T> where T: Unsize<U> + ?Sized, U: ?Sized`
- `impl<T, U> CoerceUnsized<Weak<U>> for Weak<T> where T: Unsize<U> + ?Sized, U: ?Sized`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)