pub trait TargetUserManager: Send + Sync {
// Required methods
fn lookup_user<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(String, String), LoopError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn follow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source_user_id: &'life1 str,
target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Looks up a user by username and optionally follows them.
Required Methods§
Sourcefn lookup_user<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(String, String), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn lookup_user<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(String, String), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up a user by username. Returns (user_id, username).
Sourcefn follow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source_user_id: &'life1 str,
target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn follow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source_user_id: &'life1 str,
target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), LoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Follow a user.