You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: containers.rs
    path of file: ./repos/juniper/juniper/src/types
    
    the code of the file until where you have to start completion: use std::{
    mem::{self, MaybeUninit},
    ptr,
};

use crate::{
    ast::{FromInputValue, InputValue, Selection, ToInputValue},
    executor::{ExecutionResult, Executor, FieldError, IntoFieldError, Registry},
    schema::meta::MetaType,
    types::{
        async_await::GraphQLValueAsync,
        base::{GraphQLType, GraphQLValue},
    },
    value::{ScalarValue, Value},
};

impl<S, T> GraphQLType<S> for Option<T>
where
    T: GraphQLType<S>,
    S: ScalarValue,
{
    fn name(_: &Self::TypeInfo) -> Option<&'static str> {
        None
    }

    fn meta<'r>(info: &Self::TypeInfo, registry: &mut Registry<'r, S>) -> MetaType<'r, S>
    where
        S: 'r,
    {
        registry.build_nullable_type::<T>(info).into_meta()
    }
}

impl<S, T> GraphQLValue<S> for Option<T>
where
    S: ScalarValue,
    T: GraphQLValue<S>,
{
    type Context = T::Context;
    type TypeInfo = T::TypeInfo;

    fn type_name(&self, _: &Self::TypeInfo) -> Option<&'static str> {
        None
    }

    fn resolve(
        &self,
        info: &Self::TypeInfo,
        _: Option<&[Selection<S>]>,
        executor: &Executor<Self::Context, S>,
    ) -> ExecutionResult<S> {
        match *self {
            Some(ref obj) => executor.resolve(info, obj),
            None => Ok(Value::null()),
        }
    }
}

impl<S, T> GraphQLValueAsync<S> for Option<T>
where
    T: GraphQLValueAsync<S>,
    T::TypeInfo: Sync,
    T::Context: Sync,
    S: ScalarValue + Send + Sync,
{
    fn resolve_async<'a>(
        &'a self,
        info: &'a Self::TypeInfo,
        _: Option<&'a [Selection<S>]>,
        executor: &'a Executor<Self::Context, S>,
    ) -> crate::BoxFuture<'a, ExecutionResult<S>> {
        let f = async move {
            let value = match self {
                Some(obj) => executor.resolve_into_value_async(info, obj).await,
                None => Value::null(),
            };
            Ok(value)
        };
        Box::pin(f)
    }
}

impl<S, T: FromInputValue<S>> FromInputValue<S> for Option<T> {
    type Error = T::Error;

    fn from_input_value(v: &InputValue<S>) -> Result<Self, Self::Error> {
        match v {
            InputValue::Null => Ok(None),
            v => v.convert().map(Some),
        }
    }
}

impl<S, T: ToInputValue<S>> ToInputValue<S> for Option<T> {
    fn to_input_value(&self) -> InputValue<S> {
        match self {
            Some(v) => v.to_input_value(),
            None => InputValue::Null,
        }
    }
}

impl<S, T> GraphQLType<S> for Vec<T>
where
    T: GraphQLType<S>,
    S: ScalarValue,
{
    fn name(_: &Self::TypeInfo) -> Option<&'static str> {
        None
    }

    fn meta<'r>(info: &Self::TypeInfo, registry: &mut Registry<'r, S>) -> MetaType<'r, S>
    where
        S: 'r,
    {
        registry.build_list_type::<T>(info, None).into_meta()
    }
}

impl<S, T> GraphQLValue<S> for Vec<T>
where
    T: GraphQLValue<S>,
    S: ScalarValue,
{
    type Context = T::Context;
    type TypeInfo = T::TypeInfo;

    fn type_name(&self, _: &Self::TypeInfo) -> Option<&'static str> {
        None
    }

    fn resolve(
        &self,
        info: &Self::TypeInfo,
        _: Option<&[Selection<S>]>,
        executor: &Executor<Self::Context, S>,
    ) -> ExecutionResult<S> {
        resolve_into_list(executor, info, self.iter())
    }
}

impl<S, T> GraphQLValueAsync<S> for Vec<T>
where
    T: GraphQLValueAsync<S>,
    T::TypeInfo: Sync,
    T::Context: Sync,
    S: ScalarValue + Send + Sync,
{
    fn resolve_async<'a>(
        &'a self,
        info: &'a Self::TypeInfo,
        _: Option<&'a [Selection<S>]>,
        executor: &'a Executor<Self::Context, S>,
    ) -> crate::BoxFuture<'a, ExecutionResult<S>> {
        let f = resolve_into_list_async(executor, info, self.iter());
        Box::pin(f)
    }
}

impl<S: ScalarValue, T: FromInputValue<S>> FromInputValue<S> for Vec<T> {
    type Error = FromInputValueVecError<T, S>;

    fn from_input_value(v: &InputValue<S>) -> Result<Self, Self::Error> {
        match v {
            InputValue::List(l) => l
                .iter()
                .map(|i| i.item.convert().map_err(FromInputValueVecError::Item))
                .collect(),
            // See "Input Coercion" on List types:
            // https://spec.graphql.org/October2021#sec-Combining-List-and-Non-Null
            InputValue::Null => Err(FromInputValueVecError::Null),
            other => other
                .convert()
                .map(|e| vec![e])
                .map_err(FromInputValueVecError::Item),
        }
    }
}

impl<T, S> ToInputValue<S> for Vec<T>
where
    T: ToInputValue<S>,
    S: ScalarValue,
{
    fn to_input_value(&self) -> InputValue<S> {
        InputValue::list(self.iter().map(T::to_input_value).collect())
    }
}

/// Possible errors of converting [`InputValue`] into [`Vec`].
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum FromInputValueVecError<T, S>
where
    T: FromInputValue<S>,
    S: ScalarValue,
{
    /// [`InputValue`] cannot be [`Null`].
    ///
    /// See ["Combining List and Non-Null" section of spec][1].
    ///
    /// [`Null`]: [`InputValue::Null`]
    /// [1]: https:
    
    fn from_input_value(v: &InputValue<S>) -> Result<Self, Self::Error> {
        struct PartiallyInitializedArray<T, const N: usize> {
            arr: [MaybeUninit<T>; N],
            init_len: usize,
            no_drop: bool,
        }

        impl<T, const N: usize> Drop for PartiallyInitializedArray<T, N> {
            fn drop(&mut self) {
                if self.no_drop {
                    return;
                }
                // Dropping a `MaybeUninit` does nothing, thus we need to drop
                // the initialized elements manually, otherwise we may introduce
                // a memory/resource leak if `T: Drop`.
                for elem in &mut self.arr[0..self.init_len] {
                    // SAFETY: This is safe, because `self.init_len` represents
                    //         exactly the number of initialized elements.
                    unsafe {
                        ptr::drop_in_place(elem.as_mut_ptr());
                    }
                }
            }
        }

        match *v {
            InputValue::List(ref ls) => {
                if ls.len() != N {
                    return Err(FromInputValueArrayError::WrongCount {
                        actual: ls.len(),
                        expected: N,
                    });
                }
                if N == 0 {
                    // TODO: Use `mem::transmute` instead of
                    //       `mem::transmute_copy` below, once it's allowed
                    //       for const generics:
                    //       https://github.com/rust-lang/rust/issues/61956
                    // SAFETY: `mem::transmute_copy` is safe here, because we
                    //         check `N` to be `0`. It's no-op, actually.
                    return Ok(unsafe { mem::transmute_copy::<[T; 0], Self>(&[]) });
                }

                // SAFETY: The reason we're using a wrapper struct implementing
                //         `Drop` here is to be panic safe:
                //         `T: FromInputValue<S>` implementation is not
                //         controlled by us, so calling `i.item.convert()` below
                //         may cause a panic when our array is initialized only
                //         partially. In such situation we need to drop already
                //         initialized values to avoid possible memory/resource
                //         leaks if `T: Drop`.
                let mut out = PartiallyInitializedArray::<T, N> {
                    // SAFETY: The `.assume_init()` here is safe, because the
                    //         type we are claiming to have initialized here is
                    //         a bunch of `MaybeUninit`s, which do not require
                    //         any initialization.
                    arr: unsafe { MaybeUninit::uninit().assume_init() },
                    init_len: 0,
                    no_drop: false,
                };

                let mut items = ls.iter().map(|i| i.item.convert());
                for elem in &mut out.arr[..] {
                    if let Some(i) = items
                        .next()
                        .transpose()
                        .map_err(FromInputValueArrayError::Item)?
                    {
                        *elem = MaybeUninit::new(i);
                        out.init_len += 1;
                    }
                }

                // Do not drop collected `items`, because we're going to return
                // them.
                out.no_drop = true;

                // TODO: Use `mem::transmute` instead of `mem::transmute_copy`
                //       below, once it's allowed for const generics:
                //       https://github.com/rust-lang/rust/issues/61956
                // SAFETY: `mem::transmute_copy` is safe here, because we have
                //         exactly `N` initialized `items`.
                //         Also, despite `mem::transmute_copy` copies the value,
                //         we won't have a double-free when `T: Drop` here,
                //         because original array elements are `MaybeUninit`, so
                //         do nothing on `Drop`.
                Ok(unsafe { mem::transmute_copy::<_, Self>(&out.arr) })
            }
            // See "Input Coercion" on List types:
            // https://spec.graphql.org/October2021#sec-Combining-List-and-Non-Null
            InputValue::Null => Err(FromInputValueArrayError::Null),
            ref other => {
                other
                    .convert()
                    .map_err(FromInputValueArrayError::Item)
                    .and_then(|e: T| {
                        // TODO: Use `mem::transmute` instead of
                        //       `mem::transmute_copy` below, once it's allowed
                        //       for const generics:
                        //       https://github.com/rust-lang/rust/issues/61956
                        if N == 1 {
                            // SAFETY: `mem::transmute_copy` is safe here,
                            //         because we check `N` to be `1`.
                            //         Also, despite `mem::transmute_copy`
                            //         copies the value, we won't have a
                            //         double-free when `T: Drop` here, because
                            //         original `e: T` value is wrapped into
                            //         `mem::ManuallyDrop`, so does nothing on
                            //         `Drop`.
                            Ok(unsafe {
                                mem::transmute_copy::<_, Self>(&[mem::ManuallyDrop::new(e)])
                            })
                        } else {
                            Err(FromInputValueArrayError::WrongCount {
                                actual: 1,
                                expected: N,
                            })
                        }
                    })
            }
        }
    }