pub struct RssService;Expand description
RSS 服务
负责生成和管理 RSS 2.0 订阅源 XML 文件。 支持按业务事件异步增量刷新,避免全量重建。
Implementations§
Source§impl RssService
impl RssService
Sourcepub fn refresh(state: &AppState, scope: RssRefreshScope)
pub fn refresh(state: &AppState, scope: RssRefreshScope)
按业务事件异步刷新 RSS(失败仅打日志)
Sourcepub async fn refresh_now(
state: &AppState,
scope: RssRefreshScope,
) -> ApiResult<()>
pub async fn refresh_now( state: &AppState, scope: RssRefreshScope, ) -> ApiResult<()>
同步刷新(集成测试或需 await 时使用)
Sourcepub async fn run_startup_refresh(state: &AppState) -> ApiResult<()>
pub async fn run_startup_refresh(state: &AppState) -> ApiResult<()>
启动时全量刷新(非轮询)
Sourcepub async fn rss_episode_new(state: &AppState) -> ApiResult<()>
pub async fn rss_episode_new(state: &AppState) -> ApiResult<()>
生成 rssEpisode.xml(最新 5 话新单话提醒)
Sourcepub async fn rss_episode_all_posts(state: &AppState) -> ApiResult<()>
pub async fn rss_episode_all_posts(state: &AppState) -> ApiResult<()>
生成全部岗位的 rssEpisode_*.xml(对齐 Java rssEpisodeAllPosts)
Sourcepub async fn rss_episode(state: &AppState, post_name: &str) -> ApiResult<()>
pub async fn rss_episode(state: &AppState, post_name: &str) -> ApiResult<()>
生成指定岗位的 rssEpisode_{post}.xml
Sourcepub async fn rss_publish_link(
state: &AppState,
episode_id: i32,
) -> ApiResult<()>
pub async fn rss_publish_link( state: &AppState, episode_id: i32, ) -> ApiResult<()>
生成 rssPublishLink.xml
Sourcepub async fn rss_reminder(state: &AppState) -> ApiResult<()>
pub async fn rss_reminder(state: &AppState) -> ApiResult<()>
生成 rssMember.xml(三月未交稿提醒)
Auto Trait Implementations§
impl Freeze for RssService
impl RefUnwindSafe for RssService
impl Send for RssService
impl Sync for RssService
impl Unpin for RssService
impl UnsafeUnpin for RssService
impl UnwindSafe for RssService
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<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request