/// Copy fields (u8) are skipped; non-Copy (String) gets into_field
#[fieldwork(into_field)]
struct Mixed {
    red: u8,
    green: u8,
    blue: u8,
    name: String,
}
impl Mixed {
    pub fn into_name(self) -> String {
        self.name
    }
}
/// Newtype with #[field = "inner"] produces the conventional into_inner
#[fieldwork(into_field)]
struct Wrapper(#[field = "inner"] String);
impl Wrapper {
    pub fn into_inner(self) -> String {
        self.0
    }
}
/// Per-field opt-in alongside a copy type that would be skipped anyway
struct OptIn {
    #[field(into_field)]
    name: String,
    id: u32,
}
impl OptIn {
    pub fn into_name(self) -> String {
        self.name
    }
}
/// Explicit copy=true on a non-Copy type: into_field should be skipped
#[fieldwork(into_field)]
struct ExplicitCopyOnString {
    #[field(copy)]
    label: String,
    value: String,
}
impl ExplicitCopyOnString {
    pub fn into_value(self) -> String {
        self.value
    }
}
/// Explicit copy=false on a Copy type: into_field should be generated
#[fieldwork(into_field)]
struct ExplicitNoCopyOnU8 {
    #[field(copy = false)]
    id: u32,
    name: String,
}
impl ExplicitNoCopyOnU8 {
    pub fn into_id(self) -> u32 {
        self.id
    }
    pub fn into_name(self) -> String {
        self.name
    }
}
/// Option<CopyType>: skipped via borrow_inner + copy detection
/// Option<NonCopyType>: generated
#[fieldwork(into_field)]
struct OptionFields {
    opt_copy: Option<u8>,
    opt_string: Option<String>,
}
impl OptionFields {
    pub fn into_opt_string(self) -> Option<String> {
        self.opt_string
    }
}
/// Enum: into_field skips Copy types (same as struct behavior)
#[fieldwork(into_field)]
enum Coords {
    TwoD { x: i32, y: i32 },
    ThreeD { x: i32, y: i32 },
}
impl Coords {}
/// Enum: into_field with copy = false on Copy type → generates into_field
#[fieldwork(into_field)]
enum ExplicitNoCopy {
    A { #[field(copy = false)] id: u32 },
    B { id: u32 },
}
impl ExplicitNoCopy {
    pub fn into_id(self) -> u32 {
        match self {
            Self::A { id, .. } | Self::B { id, .. } => id,
        }
    }
}
/// Enum: into_field on non-Copy full coverage
#[fieldwork(into_field)]
enum Messages {
    Simple { text: String, code: u32 },
    Detailed { text: String, code: u32 },
}
impl Messages {
    pub fn into_text(self) -> String {
        match self {
            Self::Simple { text, .. } | Self::Detailed { text, .. } => text,
        }
    }
}
/// Enum: into_field on partial non-Copy field — nothing generates (same as set)
#[fieldwork(into_field)]
enum PartialOwned {
    Rich { name: String, code: u32 },
    Simple { code: u32 },
}
impl PartialOwned {}
