Struct TypeSlice

pub struct TypeSlice { pub attrs: Vec<Attribute>, pub bracket_token: Bracket, pub elem: Box<Type> }

A dynamically sized slice type: [T].

Fields

attrs: Vec<Attribute>
bracket_token: Bracket
elem: Box<Type>

Trait Implementations

impl Clone for TypeSlice

fn clone(&self) -> Self

impl Parse for TypeSlice

fn parse(input: ParseStream<'_>) -> Result<Self>

impl ToTokens for TypeSlice

fn to_tokens(&self, tokens: &mut TokenStream)

Auto Trait Implementations

impl !Send for TypeSlice

impl !Sync for TypeSlice

impl Freeze for TypeSlice

impl RefUnwindSafe for TypeSlice

impl Unpin for TypeSlice

impl UnsafeUnpin for TypeSlice

impl UnwindSafe for TypeSlice

Blanket Implementations

impl<T> Any for TypeSlice where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for TypeSlice where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for TypeSlice where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for TypeSlice where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for TypeSlice

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Spanned for TypeSlice where T: Spanned + ?Sized,

fn span(&self) -> Span

impl<T> ToOwned for TypeSlice where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for TypeSlice where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for TypeSlice where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>