Skip to content

Commit

Permalink
do expose the query result -- we're gonna need it
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Mar 25, 2024
1 parent d9c3ec2 commit c3f0404
Show file tree
Hide file tree
Showing 30 changed files with 794 additions and 509 deletions.
5 changes: 4 additions & 1 deletion crates/re_query2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,8 @@ pub trait ToArchetype<A: re_types_core::Archetype> {
///
/// Automatically handles all aspects of the query process: deserialization, caching, promise
/// resolution, etc.
fn to_archetype(&self, resolver: &crate::PromiseResolver) -> crate::PromiseResult<A>;
fn to_archetype(
&self,
resolver: &crate::PromiseResolver,
) -> crate::PromiseResult<crate::Result<A>>;
}
2 changes: 1 addition & 1 deletion crates/re_query_cache2/examples/latest_at_archetype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn main() -> anyhow::Result<()> {
// cache an entire archetype all at once.
use re_query_cache2::ToArchetype as _;

let arch: Points2D = match results.to_archetype(&resolver) {
let arch: Points2D = match results.to_archetype(&resolver).flatten() {
PromiseResult::Pending => {
// Handle the fact that the data isn't ready appropriately.
return Ok(());
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 39 additions & 21 deletions crates/re_query_cache2/src/latest_at/to_archetype/arrows2d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 39 additions & 21 deletions crates/re_query_cache2/src/latest_at/to_archetype/arrows3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 28 additions & 22 deletions crates/re_query_cache2/src/latest_at/to_archetype/asset3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c3f0404

Please sign in to comment.