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: owned_format_item.rs
    path of file: ./repos/time/time/src/format_description
    
    the code of the file until where you have to start completion: //! A format item with owned data.

use alloc::boxed::Box;
use alloc::string::String;
use alloc::vec::Vec;
use core::fmt;

use crate::error;
use crate::format_description::{Component, FormatItem};

/// A complete description of how to format and parse a type.
#[non_exhaustive]
#[derive(Clone, PartialEq, Eq)]
pub enum OwnedFormatItem {
    /// Bytes that are formatted as-is.
    ///
    /// **Note**: If you call the `format` method that returns a `String`, these bytes will be
    /// passed through `String::from_utf8_lossy`.
    Literal(Box<[u8]>),
    /// A minimal representation of a single non-literal item.
    Component(Component),
    /// A series of literals or components that collectively f
    
    fn from(item: &FormatItem<'_>) -> Self {
        match item {
            FormatItem::Literal(literal) => Self::Literal(literal.to_vec().into_boxed_slice()),
            FormatItem::Component(component) => Self::Component(*component),
            FormatItem::Compound(compound) => Self::Compound(
                compound
                    .iter()
                    .cloned()
                    .map(Into::into)
                    .collect::<Vec<_>>()
                    .into_boxed_slice(),
            ),
            FormatItem::Optional(item) => Self::Optional(Box::new((*item).into())),
            FormatItem::First(items) => Self::First(
                items
                    .iter()
                    .cloned()
                    .map(Into::into)
                    .collect::<Vec<_>>()
                    .into_boxed_slice(),
            ),
        }
    }