#[non_exhaustive]pub struct RawStreamParams {
pub query: Option<String>,
pub sources: Option<Vec<String>>,
pub exclude_sources: Option<Vec<String>>,
pub source_types: Option<Vec<SourceType>>,
pub exclude_source_types: Option<Vec<SourceType>>,
pub language: Option<String>,
pub include_updates: Option<bool>,
}Expand description
Subscribe parameters of the raw stream (client.raw_stream()). Raw has no include:
it delivers the article skeleton only.
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.query: Option<String>Query.
sources: Option<Vec<String>>Only these source domains.
exclude_sources: Option<Vec<String>>Source domains left out.
source_types: Option<Vec<SourceType>>Only sources of these types. Articles of unclassified sources never match.
exclude_source_types: Option<Vec<SourceType>>Source types left out. Articles of unclassified sources are kept.
language: Option<String>One language.
include_updates: Option<bool>Also deliver article.updated.
Implementations§
Source§impl RawStreamParams
impl RawStreamParams
Sourcepub fn from_json(json: &str) -> Result<Self>
pub fn from_json(json: &str) -> Result<Self>
Reads parameters from a JSON object with the wire keys; unknown keys (include too)
are rejected.
Sourcepub fn exclude_sources<I, S>(self, values: I) -> Self
pub fn exclude_sources<I, S>(self, values: I) -> Self
Source domains left out.
Sourcepub fn source_types<I, S>(self, values: I) -> Self
pub fn source_types<I, S>(self, values: I) -> Self
Only sources of these types (SourceType::NEWSWIRE, …).
Sourcepub fn exclude_source_types<I, S>(self, values: I) -> Self
pub fn exclude_source_types<I, S>(self, values: I) -> Self
Source types left out.
Sourcepub fn include_updates(self, value: bool) -> Self
pub fn include_updates(self, value: bool) -> Self
Also deliver article.updated.
Trait Implementations§
Source§impl Clone for RawStreamParams
impl Clone for RawStreamParams
Source§impl Debug for RawStreamParams
impl Debug for RawStreamParams
Source§impl Default for RawStreamParams
impl Default for RawStreamParams
Source§impl<'de> Deserialize<'de> for RawStreamParams
impl<'de> Deserialize<'de> for RawStreamParams
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
impl Eq for RawStreamParams
Source§impl PartialEq for RawStreamParams
impl PartialEq for RawStreamParams
impl StructuralPartialEq for RawStreamParams
Auto Trait Implementations§
impl Forget for RawStreamParams
impl Freeze for RawStreamParamswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<SourceType>: Freeze,
impl Move for RawStreamParams
impl RefUnwindSafe for RawStreamParams
impl Send for RawStreamParamswhere
RawVecInner: Send,
impl Sync for RawStreamParamswhere
RawVecInner: Sync,
impl Unpin for RawStreamParams
impl UnsafeUnpin for RawStreamParamswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<SourceType>: UnsafeUnpin,
impl UnwindSafe for RawStreamParamswhere
RawVecInner: 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