cobia/
cape_data_traits.rs

1use crate::C;
2
3/// Any object that implements this trait can be converted to an ICapeString input argument
4///
5/// This trait is implemented by any object that can be passed as an ICapeString input
6/// argument
7pub trait CapeStringProviderIn {
8	/// Convert to ICapeString
9	fn as_cape_string_in(&self) -> C::ICapeString;
10}
11
12/// Any object that implements this trait can be converted to an ICapeString output argument
13///
14/// This trait is implemented by any object that can be passed as an ICapeString output
15/// argument
16pub trait CapeStringProviderOut {
17	/// Convert to ICapeString
18	fn as_cape_string_out(&mut self) -> C::ICapeString;
19}
20
21/// Any object that implements this trait can be compared to any CapeString type object
22///
23pub trait CapeStringConstProvider {
24	/// Convert to const CapeCharacter pointer (null terminated)
25	///
26	/// Note that the caller must ensure that life span of the pointer does not exceed the life
27	/// span of the object and note that the pointer becomes invalid upon assiging a new string
28	/// to the object
29	/// 
30	fn as_capechar_const(&self) -> *const C::CapeCharacter;
31	/// Convert to const CapeCharacter pointer (null terminated) and length (without null terminator)
32	///
33	/// Note that the caller must ensure that life span of the pointer does not exceed the life
34	/// span of the object and note that the pointer becomes invalid upon assiging a new string
35	/// to the object
36	/// 
37	fn as_capechar_const_with_length(&self) -> (*const C::CapeCharacter, C::CapeSize);
38}
39
40/// Any object that implements this trait can be converted to an ICapeArrayString input argument
41///
42/// This trait is implemented by any object that can be passed as an ICapeArrayString
43/// input argument
44pub trait CapeArrayStringProviderIn {
45	/// Convert to ICapeArrayString
46	fn as_cape_array_string_in(&self) -> C::ICapeArrayString;
47}
48
49/// Any object that implements this trait can be converted to an ICapeArrayString output argument
50///
51/// This trait is implemented by any object that can be passed as an ICapeArrayString
52/// output argument
53pub trait CapeArrayStringProviderOut {
54	/// Convert to ICapeArrayString
55	fn as_cape_array_string_out(&mut self) -> C::ICapeArrayString;
56}
57
58/// Any object that implements this trait can be converted to an ICapeArrayReal input argument
59///
60/// This trait is implemented by any object that can be passed as an ICapeArrayReal
61/// input argument
62pub trait CapeArrayRealProviderIn {
63	/// Convert to ICapeArrayReal
64	fn as_cape_array_real_in(&self) -> C::ICapeArrayReal;
65}
66
67/// Any object that implements this trait can be converted to an ICapeArrayReal output argument
68///
69/// This trait is implemented by any object that can be passed as an ICapeArrayReal
70/// output argument
71pub trait CapeArrayRealProviderOut {
72	/// Convert to ICapeArrayReal
73	fn as_cape_array_real_out(&mut self) -> C::ICapeArrayReal;
74}
75
76/// Any object that implements this trait can be converted to an ICapeArrayInteger input argument
77///
78/// This trait is implemented by any object that can be passed as an ICapeArrayInteger
79/// input argument
80pub trait CapeArrayIntegerProviderIn {
81	/// Convert to ICapeArrayInteger
82	fn as_cape_array_integer_in(&self) -> C::ICapeArrayInteger;
83}
84
85/// Any object that implements this trait can be converted to an ICapeArrayInteger output argument
86///
87/// This trait is implemented by any object that can be passed as an ICapeArrayInteger
88/// output argument
89pub trait CapeArrayIntegerProviderOut {
90	/// Convert to ICapeArrayInteger
91	fn as_cape_array_integer_out(&mut self) -> C::ICapeArrayInteger;
92}
93
94/// Any object that implements this trait can be converted to an ICapeArrayByte input argument
95///
96/// This trait is implemented by any object that can be passed as an ICapeArrayByte
97/// input argument
98pub trait CapeArrayByteProviderIn {
99	/// Convert to ICapeArrayByte
100	fn as_cape_array_byte_in(&self) -> C::ICapeArrayByte;
101}
102
103/// Any object that implements this trait can be converted to an ICapeArrayByte output argument
104///
105/// This trait is implemented by any object that can be passed as an ICapeArrayByte
106/// output argument
107pub trait CapeArrayByteProviderOut {
108	/// Convert to ICapeArrayByte
109	fn as_cape_array_byte_out(&mut self) -> C::ICapeArrayByte;
110}
111
112/// Any object that implements this trait can be converted to an ICapeArrayBoolean input argument
113///
114/// This trait is implemented by any object that can be passed as an ICapeArrayBoolean
115/// input argument
116pub trait CapeArrayBooleanProviderIn {
117	/// Convert to ICapeArrayBoolean
118	fn as_cape_array_boolean_in(&self) -> C::ICapeArrayBoolean;
119}
120
121/// Any object that implements this trait can be converted to an ICapeArrayBoolean output argument
122///
123/// This trait is implemented by any object that can be passed as an ICapeArrayBoolean
124/// output argument
125pub trait CapeArrayBooleanProviderOut {
126	/// Convert to ICapeArrayBoolean
127	fn as_cape_array_boolean_out(&mut self) -> C::ICapeArrayBoolean;
128}
129
130/// Any object that implements this trait can be converted to an ICapeArrayEnumeration input argument
131///
132/// This trait is implemented by any object that can be passed as an ICapeArrayEnumeration
133/// input argument
134pub trait CapeArrayEnumerationProviderIn {
135	/// Convert to ICapeArrayEnumeration
136	fn as_cape_array_enumeration_in(&self) -> C::ICapeArrayEnumeration;
137}
138
139/// Any object that implements this trait can be converted to an ICapeArrayEnumeration output argument
140///
141/// This trait is implemented by any object that can be passed as an ICapeArrayEnumeration
142/// output argument
143pub trait CapeArrayEnumerationProviderOut {
144	/// Convert to ICapeArrayEnumeration
145	fn as_cape_array_enumeration_out(&mut self) -> C::ICapeArrayEnumeration;
146}
147
148/// Any object that implements this trait can be converted to an ICapeValue input argument
149///
150/// This trait is implemented by any object that can be passed as an ICapeValue
151/// input argument
152pub trait CapeValueProviderIn {
153	/// Convert to ICapeValue
154	fn as_cape_value_in(&self) -> C::ICapeValue;
155}
156
157/// Any object that implements this trait can be converted to an ICapeValue output argument
158///
159/// This trait is implemented by any object that can be passed as an ICapeValue
160/// output argument
161pub trait CapeValueProviderOut {
162	/// Convert to ICapeValue
163	fn as_cape_value_out(&mut self) -> C::ICapeValue;
164}
165
166
167/// Any object that implements this trait can be converted to an ICapeArrayValue input argument
168/// 
169/// This trait is implemented by any object that can be passed as an ICapeArrayValue
170/// input argument
171pub trait CapeArrayValueProviderIn {
172	/// Convert to ICapeArrayValue
173	fn as_cape_array_value_in(&self) -> C::ICapeArrayValue;
174}
175
176/// Any object that implements this trait can be converted to an ICapeArrayValue output argument
177/// 
178/// This trait is implemented by any object that can be passed as an ICapeArrayValue
179/// output argument
180pub trait CapeArrayValueProviderOut {
181	/// Convert to ICapeArrayValue
182	fn as_cape_array_value_out(&mut self) -> C::ICapeArrayValue;
183}