1use crate::{ConversionError, ExcelStr, ExcelValueRef, FromExcel};
9
10#[derive(Debug)]
12pub struct ExcelValueArg<'call>(ExcelValueRef<'call>);
13
14impl<'call> ExcelValueArg<'call> {
15 pub const fn new(value: ExcelValueRef<'call>) -> Self {
17 Self(value)
18 }
19
20 pub fn into_inner(self) -> ExcelValueRef<'call> {
22 self.0
23 }
24}
25
26impl<'call> FromExcel<'call> for ExcelValueArg<'call> {
27 fn from_excel(value: ExcelValueRef<'call>) -> Result<Self, ConversionError> {
28 Ok(Self::new(value))
29 }
30}
31
32#[derive(Debug)]
34pub struct ExcelReferenceArg<'call>(ExcelValueRef<'call>);
35
36impl<'call> ExcelReferenceArg<'call> {
37 pub const fn new(value: ExcelValueRef<'call>) -> Self {
39 Self(value)
40 }
41
42 pub fn into_inner(self) -> ExcelValueRef<'call> {
44 self.0
45 }
46}
47
48impl<'call> FromExcel<'call> for ExcelReferenceArg<'call> {
49 fn from_excel(value: ExcelValueRef<'call>) -> Result<Self, ConversionError> {
50 Ok(Self::new(value))
51 }
52}
53
54#[derive(Debug)]
56pub struct CountedUtf16Arg<'call>(ExcelStr<'call>);
57
58impl<'call> CountedUtf16Arg<'call> {
59 pub const fn new(value: ExcelStr<'call>) -> Self {
61 Self(value)
62 }
63
64 pub const fn as_excel_str(&self) -> &ExcelStr<'call> {
66 &self.0
67 }
68
69 pub fn into_inner(self) -> ExcelStr<'call> {
71 self.0
72 }
73}
74
75#[derive(Debug)]
77pub struct NullTerminatedUtf16Arg<'call>(ExcelStr<'call>);
78
79impl<'call> NullTerminatedUtf16Arg<'call> {
80 pub const fn new(value: ExcelStr<'call>) -> Self {
82 Self(value)
83 }
84
85 pub const fn as_excel_str(&self) -> &ExcelStr<'call> {
87 &self.0
88 }
89
90 pub fn into_inner(self) -> ExcelStr<'call> {
92 self.0
93 }
94}