pub trait AbstractServers: Sync + Send {
// Required methods
fn insert_server<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 Server,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fetch_server<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Server>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fetch_servers<'a, 'life0, 'async_trait>(
&'life0 self,
ids: &'a [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<Server>>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait;
fn update_server<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
partial: &'life2 PartialServer,
remove: Vec<FieldsServer>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_server<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn insert_role<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
role_id: &'life2 str,
role: &'life3 Role,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn update_role<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
role_id: &'life2 str,
partial: &'life3 PartialRole,
remove: Vec<FieldsRole>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn delete_role<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
role_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}
Required Methods§
Sourcefn insert_server<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 Server,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_server<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 Server,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Insert a new server into database
Sourcefn fetch_server<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Server>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_server<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Server>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a server by its id
Sourcefn fetch_servers<'a, 'life0, 'async_trait>(
&'life0 self,
ids: &'a [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<Server>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn fetch_servers<'a, 'life0, 'async_trait>(
&'life0 self,
ids: &'a [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<Server>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Fetch a servers by their ids
Sourcefn update_server<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
partial: &'life2 PartialServer,
remove: Vec<FieldsServer>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_server<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
partial: &'life2 PartialServer,
remove: Vec<FieldsServer>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update a server with new information
Sourcefn delete_server<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_server<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a server by its id
Sourcefn insert_role<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
role_id: &'life2 str,
role: &'life3 Role,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn insert_role<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
role_id: &'life2 str,
role: &'life3 Role,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Insert a new role into server object
Sourcefn update_role<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
role_id: &'life2 str,
partial: &'life3 PartialRole,
remove: Vec<FieldsRole>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update_role<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
role_id: &'life2 str,
partial: &'life3 PartialRole,
remove: Vec<FieldsRole>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Update an existing role on a server
Sourcefn delete_role<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
role_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_role<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
role_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete a role from a server
Also updates channels and members.