#[non_exhaustive]pub struct ProviderPage<T> {
pub items: Vec<T>,
pub next: Option<PageCursor>,
pub provider_id: Provider,
pub request_id: Option<String>,
pub results_count: Option<usize>,
pub query_count: Option<usize>,
pub reported_symbol: Option<String>,
pub adjusted: Option<bool>,
}Expand description
One provider response, without collecting subsequent pages.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.items: Vec<T>Records returned on this page.
next: Option<PageCursor>Persist with the records before requesting the next page.
provider_id: ProviderProvider that owns this page and its continuation.
request_id: Option<String>Provider request identifier.
results_count: Option<usize>Provider-reported result count, when supplied.
query_count: Option<usize>Provider query count; this need not equal the number of bars.
reported_symbol: Option<String>Symbol reported by the response.
adjusted: Option<bool>Adjustment reported by the response.
Implementations§
Source§impl<T> ProviderPage<T>
impl<T> ProviderPage<T>
Sourcepub fn new(
items: Vec<T>,
provider_id: Provider,
next: Option<PageCursor>,
) -> Self
pub fn new( items: Vec<T>, provider_id: Provider, next: Option<PageCursor>, ) -> Self
A page from provider_id, with no response metadata. next is None on
the last page; otherwise build it with PageCursor::continuation.
Trait Implementations§
Source§impl<T: Clone> Clone for ProviderPage<T>
impl<T: Clone> Clone for ProviderPage<T>
Source§impl<T: Debug> Debug for ProviderPage<T>
impl<T: Debug> Debug for ProviderPage<T>
Source§impl<'de, T> Deserialize<'de> for ProviderPage<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ProviderPage<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for ProviderPage<T>
impl<T> RefUnwindSafe for ProviderPage<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for ProviderPage<T>
impl<T> Sync for ProviderPage<T>
impl<T> Unpin for ProviderPage<T>
impl<T> UnsafeUnpin for ProviderPage<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for ProviderPage<T>where
Vec<T>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more