Fixed instance lifetime parameter
This commit is contained in:
parent
bc3e93ce5a
commit
8414bbb1c2
|
@ -8,7 +8,7 @@ pub mod login {
|
||||||
use crate::errors::InstanceServerError;
|
use crate::errors::InstanceServerError;
|
||||||
use crate::instance::Instance;
|
use crate::instance::Instance;
|
||||||
|
|
||||||
impl Instance<'_> {
|
impl<'a> Instance<'a> {
|
||||||
pub async fn login_account(
|
pub async fn login_account(
|
||||||
&mut self,
|
&mut self,
|
||||||
login_schema: &LoginSchema,
|
login_schema: &LoginSchema,
|
||||||
|
|
|
@ -8,7 +8,7 @@ pub mod register {
|
||||||
instance::{Instance, Token},
|
instance::{Instance, Token},
|
||||||
};
|
};
|
||||||
|
|
||||||
impl Instance<'_> {
|
impl<'a> Instance<'a> {
|
||||||
/**
|
/**
|
||||||
Registers a new user on the Spacebar server.
|
Registers a new user on the Spacebar server.
|
||||||
# Arguments
|
# Arguments
|
||||||
|
|
|
@ -5,7 +5,7 @@ pub mod instance {
|
||||||
use crate::errors::InstanceServerError;
|
use crate::errors::InstanceServerError;
|
||||||
use crate::{api::types::InstancePolicies, instance::Instance};
|
use crate::{api::types::InstancePolicies, instance::Instance};
|
||||||
|
|
||||||
impl Instance<'_> {
|
impl<'a> Instance<'a> {
|
||||||
/**
|
/**
|
||||||
Gets the instance policies schema.
|
Gets the instance policies schema.
|
||||||
# Errors
|
# Errors
|
||||||
|
|
|
@ -20,7 +20,7 @@ pub struct Instance<'a> {
|
||||||
pub users: HashMap<Token, User>,
|
pub users: HashMap<Token, User>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Instance<'_> {
|
impl<'a> Instance<'a> {
|
||||||
/// Creates a new [`Instance`].
|
/// Creates a new [`Instance`].
|
||||||
/// # Arguments
|
/// # Arguments
|
||||||
/// * `urls` - The [`URLBundle`] that contains all the URLs that are needed to connect to the Spacebar server.
|
/// * `urls` - The [`URLBundle`] that contains all the URLs that are needed to connect to the Spacebar server.
|
||||||
|
@ -30,7 +30,7 @@ impl Instance<'_> {
|
||||||
pub async fn new(
|
pub async fn new(
|
||||||
urls: URLBundle,
|
urls: URLBundle,
|
||||||
requester: LimitedRequester,
|
requester: LimitedRequester,
|
||||||
) -> Result<Instance<'static>, InstanceServerError> {
|
) -> Result<Instance<'a>, InstanceServerError> {
|
||||||
let users: HashMap<Token, User> = HashMap::new();
|
let users: HashMap<Token, User> = HashMap::new();
|
||||||
let mut instance = Instance {
|
let mut instance = Instance {
|
||||||
urls: urls.clone(),
|
urls: urls.clone(),
|
||||||
|
|
Loading…
Reference in New Issue