Trait furbooru::firehose::FirehoseAdaptor [−][src]
pub trait FirehoseAdaptor {
fn image_created<'life0, 'async_trait>(
&'life0 self,
_img: Image
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn image_description_updated<'life0, 'async_trait>(
&'life0 self,
_image_id: u64,
_added: String,
_removed: String
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn image_processed<'life0, 'async_trait>(
&'life0 self,
_id: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn image_source_updated<'life0, 'async_trait>(
&'life0 self,
_id: u64,
_added: Vec<String>,
_removed: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn image_tag_updated<'life0, 'async_trait>(
&'life0 self,
_id: u64,
_added: Vec<String>,
_removed: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn image_updated<'life0, 'async_trait>(
&'life0 self,
_img: Image
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn comment_created<'life0, 'async_trait>(
&'life0 self,
_cmt: Comment
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn comment_updated<'life0, 'async_trait>(
&'life0 self,
_cmt: Comment
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn post_created<'life0, 'async_trait>(
&'life0 self,
_frm: Forum,
_top: Topic,
_pst: Post
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
}
Expand description
This trait contains a series of hooks that will be called in response to various firehose events.
You do not need to implement all of these hooks, just implement the ones that are important for your application.
Provided methods
This responds to the image:create
event, which fires when a new image is created.
This responds to the image:description_update
event, which fires when the
description of an image is updated.
This responds to the image:process
event, which fires after an image is
finished processing.
This responds to the image:source_update
event, which fires after the source
of an image is updated.
This responds to the image:tag_update
event, which fires after the tags of
an image have been updated.
This responds to the image:update
event, which fires after an image has been
updated.
This responds to the comment:create
event, which fires after a comment has been
created.
This responds to the comment:update
event, which fires after a comment has been
updated.
This responds to the post:create
event, which fires after a forum post has been
created.