@@ -8,8 +8,8 @@ use crate::{SerializationResult, SerializedComponentBatch};
8
8
/// it is possible to manually extend existing bundles, or even implement fully custom ones.
9
9
///
10
10
/// All [`AsComponents`] methods are optional to implement, with the exception of
11
- /// [`AsComponents::as_component_batches `], which describes how the bundle can be interpreted
12
- /// as a set of [`ComponentBatch `]es: arrays of components that are ready to be serialized .
11
+ /// [`AsComponents::as_serialized_batches `], which describes how the bundle can be interpreted
12
+ /// as a set of [`SerializedComponentBatch `]es: serialized component data .
13
13
///
14
14
/// Have a look at our [Custom Data Loader] example to learn more about handwritten bundles.
15
15
///
@@ -37,7 +37,7 @@ pub trait AsComponents {
37
37
38
38
/// Serializes all non-null [`Component`]s of this bundle into Arrow arrays.
39
39
///
40
- /// The default implementation will simply serialize the result of [`Self::as_component_batches `]
40
+ /// The default implementation will simply serialize the result of [`Self::as_serialized_batches `]
41
41
/// as-is, which is what you want in 99.9% of cases.
42
42
///
43
43
/// [`Component`]: [crate::Component]
@@ -124,15 +124,15 @@ impl AsComponents for Vec<Box<dyn AsComponents>> {
124
124
125
125
/// ```compile_fail
126
126
/// let comp = re_types_core::components::ClearIsRecursive::default();
127
- /// let _ = (&comp as &dyn re_types_core::AsComponents).as_component_batches ();
127
+ /// let _ = (&comp as &dyn re_types_core::AsComponents).as_serialized_batches ();
128
128
/// ```
129
129
#[ allow( dead_code) ]
130
130
#[ allow( rustdoc:: private_doc_tests) ] // doc-tests are the only way to assert failed compilation
131
131
fn single_ascomponents ( ) { }
132
132
133
133
/// ```compile_fail
134
134
/// let comp = re_types_core::components::ClearIsRecursive::default();
135
- /// let _ = (&[comp] as &dyn re_types_core::AsComponents).as_component_batches ();
135
+ /// let _ = (&[comp] as &dyn re_types_core::AsComponents).as_serialized_batches ();
136
136
/// ```
137
137
#[ allow( dead_code) ]
138
138
#[ allow( rustdoc:: private_doc_tests) ] // doc-tests are the only way to assert failed compilation
@@ -143,7 +143,7 @@ fn single_ascomponents_wrapped() {
143
143
144
144
/// ```compile_fail
145
145
/// let comp = re_types_core::components::ClearIsRecursive::default();
146
- /// let _ = (&[comp, comp, comp] as &dyn re_types_core::AsComponents).as_component_batches ();
146
+ /// let _ = (&[comp, comp, comp] as &dyn re_types_core::AsComponents).as_serialized_batches ();
147
147
/// ```
148
148
#[ allow( dead_code) ]
149
149
#[ allow( rustdoc:: private_doc_tests) ] // doc-tests are the only way to assert failed compilation
@@ -155,7 +155,7 @@ fn single_ascomponents_wrapped_many() {
155
155
/// ```compile_fail
156
156
/// let comp = re_types_core::components::ClearIsRecursive::default();
157
157
/// let comps = vec![comp, comp, comp];
158
- /// let _ = (&comps as &dyn re_types_core::AsComponents).as_component_batches ();
158
+ /// let _ = (&comps as &dyn re_types_core::AsComponents).as_serialized_batches ();
159
159
/// ```
160
160
#[ allow( dead_code) ]
161
161
#[ allow( rustdoc:: private_doc_tests) ] // doc-tests are the only way to assert failed compilation
@@ -164,7 +164,7 @@ fn many_ascomponents() {}
164
164
/// ```compile_fail
165
165
/// let comp = re_types_core::components::ClearIsRecursive::default();
166
166
/// let comps = vec![comp, comp, comp];
167
- /// let _ = (&[comps] as &dyn re_types_core::AsComponents).as_component_batches ();
167
+ /// let _ = (&[comps] as &dyn re_types_core::AsComponents).as_serialized_batches ();
168
168
/// ```
169
169
#[ allow( dead_code) ]
170
170
#[ allow( rustdoc:: private_doc_tests) ] // doc-tests are the only way to assert failed compilation
@@ -182,7 +182,7 @@ fn many_componentbatch_wrapped() {}
182
182
/// ```compile_fail
183
183
/// let comp = re_types_core::components::ClearIsRecursive::default();
184
184
/// let comps = vec![comp, comp, comp];
185
- /// let _ = (&[comps.clone(), comps.clone(), comps.clone()] as &dyn re_types_core::AsComponents).as_component_batches ();
185
+ /// let _ = (&[comps.clone(), comps.clone(), comps.clone()] as &dyn re_types_core::AsComponents).as_serialized_batches ();
186
186
/// ```
187
187
#[ allow( dead_code) ]
188
188
#[ allow( rustdoc:: private_doc_tests) ] // doc-tests are the only way to assert failed compilation
0 commit comments