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 85)
67fn load_actual_index_dumps(moex_client: &Client) -> Result<Vec<IndexDump>, ExampleError> {
68 let indexes = with_retry(retry_policy(), || moex_client.indexes())?.into_actual_by_till();
69 let page_limit = NonZeroU32::new(INDEX_ANALYTICS_PAGE_LIMIT)
70 .expect("INDEX_ANALYTICS_PAGE_LIMIT constant must be greater than zero");
71
72 indexes
73 .into_iter()
74 .map(|index| {
75 let components = with_retry(retry_policy(), || {
76 moex_client
77 .index(index.id().clone())
78 .expect("index id from payload must be valid")
79 .analytics_pages(page_limit)
80 .all()
81 })?
82 .into_actual_by_session()
83 .into_sorted_by_weight_desc();
84 Ok(IndexDump {
85 index_id: index.id().as_str().to_owned().into_boxed_str(),
86 short_name: index.short_name().to_owned().into_boxed_str(),
87 components,
88 })
89 })
90 .collect()
91}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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.