pub struct IndexId(/* private fields */);Expand description
Идентификатор индекса MOEX (indexid).
Implementations§
Source§impl IndexId
impl IndexId
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Вернуть строковое представление идентификатора.
Examples found in repository?
examples/actual_indexes_dump.rs (line 101)
83fn load_actual_index_dumps(moex_client: &Client) -> Result<Vec<IndexDump>, ExampleError> {
84 let indexes = with_retry(retry_policy(), || moex_client.indexes())?.into_actual_by_till();
85 let page_limit = NonZeroU32::new(INDEX_ANALYTICS_PAGE_LIMIT)
86 .expect("INDEX_ANALYTICS_PAGE_LIMIT constant must be greater than zero");
87
88 indexes
89 .into_iter()
90 .map(|index| {
91 let components = with_retry(retry_policy(), || {
92 moex_client
93 .index(index.id().clone())
94 .expect("index id from payload must be valid")
95 .analytics_pages(page_limit)
96 .all()
97 })?
98 .into_actual_by_session()
99 .into_sorted_by_weight_desc();
100 Ok(IndexDump {
101 index_id: index.id().as_str().to_owned().into_boxed_str(),
102 short_name: index.short_name().to_owned().into_boxed_str(),
103 components,
104 })
105 })
106 .collect()
107}Trait Implementations§
impl Eq for IndexId
impl StructuralPartialEq for IndexId
Auto Trait Implementations§
impl Freeze for IndexId
impl RefUnwindSafe for IndexId
impl Send for IndexId
impl Sync for IndexId
impl Unpin for IndexId
impl UnsafeUnpin for IndexId
impl UnwindSafe for IndexId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more