pub struct Store {
pub twitter_client: TwitterClient,
pub twitter_user: User,
pub tweets: Arc<Mutex<HashMap<String, Tweet>>>,
pub tweets_feed: Arc<Mutex<Vec<String>>>,
pub tweets_feed_page_token: Arc<Mutex<Option<String>>>,
pub user_config: Arc<Mutex<UserConfig>>,
}Fields§
§twitter_client: TwitterClient§twitter_user: User§tweets: Arc<Mutex<HashMap<String, Tweet>>>§tweets_feed: Arc<Mutex<Vec<String>>>§tweets_feed_page_token: Arc<Mutex<Option<String>>>§user_config: Arc<Mutex<UserConfig>>Implementations§
Source§impl Store
impl Store
pub fn new( twitter_client: TwitterClient, twitter_user: &User, user_config: &UserConfig, ) -> Self
pub fn save_user_config(&self) -> Result<()>
pub async fn load_tweets_feed<F: Future<Output = PagedResult<Vec<Tweet>>>, G: Fn(Option<String>) -> F>( &self, g: G, restart: bool, ) -> Result<()>
pub async fn load_tweets_reverse_chronological( &self, restart: bool, ) -> Result<()>
pub async fn load_user_tweets(&self, user_id: &str, restart: bool) -> Result<()>
pub async fn load_search_tweets(&self, query: &str, restart: bool) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
impl !RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl !UnwindSafe for Store
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> 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