1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright (c) 2025 finance-query contributors
// SPDX-License-Identifier: MIT
//! Macros for generating quote summary accessor methods.
/// Generate quote summary accessor methods for Ticker.
///
/// This macro eliminates code duplication by generating accessor methods
/// from a single declaration.
///
/// # Usage
///
/// ```ignore
/// define_quote_accessors! {
/// /// Get price information
/// price -> Price, price,
///
/// /// Get summary detail
/// summary_detail -> SummaryDetail, summary_detail,
/// }
/// ```
///
/// This generates:
/// - `Ticker::price(&self) -> Result<Option<Price>>`
///
/// Each method:
/// 1. Ensures quote summary data is loaded
/// 2. Reads from cache
/// 3. Clones and returns the typed module data
)*
}
};
}
pub use define_quote_accessors;