pub async fn mark_all_as_read(
        &self,
        last_read_at: impl Into<Option<DateTime>>,
    ) -> crate::Result<()> {
        #[derive(serde::Serialize)]
        struct Inner {
            last_read_at: DateTime,
        }

        let body = last_read_at
            .into()
            .map(|last_read_at| Inner { last_read_at });
        let url = self.crab.absolute_url("notifications")?;

        let response = self.crab._put(url, body.as_ref()).await?;
        crate::map_github_error(response).await.map(drop)
    }
/// Marks all notifications as read.
///
/// If you provide a `last_read_at` parameter,
/// anything updated since this time will not be marked as read.
///
/// ```no_run
/// # async fn run() -> octocrab::Result<()> {
/// octocrab::instance()
///     .activity()
///     .notifications()
///     .mark_all_as_read(None)
///     .await?;
/// # Ok(())
/// # }
/// ```
Marks all notifications as read.
If you provide a `last_read_at` parameter,
anything updated since this time will not be marked as read.


Marks all notifications as read . If you provide a ` last_read_at ` parameter anything updated since this time will not be marked as read .
pub async fn mark_all_as_read(
        &self,
        last_read_at: impl Into<Option<DateTime>>,
    ) -> crate::Result<()> {
        #[derive(serde::Serialize)]
        struct Inner {
            last_read_at: DateTime,
        }
        let body = last_read_at
            .into()
            .map(|last_read_at| Inner { last_read_at });
        let url = self.crab.absolute_url("notifications")?;
        let response = self.crab._put(url, body.as_ref()).await?;
        crate::map_github_error(response).await.map(drop)
    }
pub async fn mark_all_as_read ( & self , last_read_at : impl Into < Option < DateTime > > , ) -> crate :: Result < ( ) > { # [ derive ( serde Serialize ) ] struct Inner { last_read_at : DateTime , } let body = last_read_at . into ( ) . map ( | last_read_at | Inner { last_read_at } ) ; let url = self . crab . absolute_url ( " " ) ? ; let response = self . crab . _put ( url , body . as_ref ( ) ) . await ? ; crate :: map_github_error ( response ) . await . map ( drop ) }
Marks all notifications as read.
Marks all notifications as read .
&self
last_read_at
impl Into<Option<DateTime>>
&self
last_read_at
impl Into<Option<DateTime>>
async fn run() -> octocrab::result<()> {
:instance()
.activity()
.notifications()
.mark_all_as_read(None)
.await?.
: instance () . activity () . notifications () . mark_all_as_read ( None ) . await? .
ok(())
None
}
None