mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 23:31:24 +01:00
update documentation of service::users::Data::iter
This commit is contained in:
parent
d1370f9834
commit
48ecf50973
3 changed files with 6 additions and 6 deletions
|
|
@ -35,7 +35,7 @@ impl service::users::Data for KeyValueDatabase {
|
||||||
.is_empty())
|
.is_empty())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the number of users registered on this server.
|
/// Returns the number of local and remote users known by this server.
|
||||||
fn count(&self) -> Result<usize> {
|
fn count(&self) -> Result<usize> {
|
||||||
Ok(self.userid_password.iter().count())
|
Ok(self.userid_password.iter().count())
|
||||||
}
|
}
|
||||||
|
|
@ -84,7 +84,7 @@ impl service::users::Data for KeyValueDatabase {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns an iterator over all users on this homeserver.
|
/// Returns an iterator over all local and remote users on this homeserver.
|
||||||
fn iter<'a>(
|
fn iter<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
) -> Box<dyn Iterator<Item = Result<OwnedUserId>> + 'a> {
|
) -> Box<dyn Iterator<Item = Result<OwnedUserId>> + 'a> {
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ impl Service {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the number of users registered on this server.
|
/// Returns the number of local and remote users known by this server.
|
||||||
pub(crate) fn count(&self) -> Result<usize> {
|
pub(crate) fn count(&self) -> Result<usize> {
|
||||||
self.db.count()
|
self.db.count()
|
||||||
}
|
}
|
||||||
|
|
@ -295,7 +295,7 @@ impl Service {
|
||||||
self.db.find_from_token(token)
|
self.db.find_from_token(token)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns an iterator over all users on this homeserver.
|
/// Returns an iterator over all local and remote users on this homeserver.
|
||||||
pub(crate) fn iter(
|
pub(crate) fn iter(
|
||||||
&self,
|
&self,
|
||||||
) -> impl Iterator<Item = Result<OwnedUserId>> + '_ {
|
) -> impl Iterator<Item = Result<OwnedUserId>> + '_ {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ pub(crate) trait Data: Send + Sync {
|
||||||
/// Check if account is deactivated
|
/// Check if account is deactivated
|
||||||
fn is_deactivated(&self, user_id: &UserId) -> Result<bool>;
|
fn is_deactivated(&self, user_id: &UserId) -> Result<bool>;
|
||||||
|
|
||||||
/// Returns the number of users registered on this server.
|
/// Returns the number of local and remote users known by this server.
|
||||||
fn count(&self) -> Result<usize>;
|
fn count(&self) -> Result<usize>;
|
||||||
|
|
||||||
/// Find out which user an access token belongs to.
|
/// Find out which user an access token belongs to.
|
||||||
|
|
@ -27,7 +27,7 @@ pub(crate) trait Data: Send + Sync {
|
||||||
token: &str,
|
token: &str,
|
||||||
) -> Result<Option<(OwnedUserId, String)>>;
|
) -> Result<Option<(OwnedUserId, String)>>;
|
||||||
|
|
||||||
/// Returns an iterator over all users on this homeserver.
|
/// Returns an iterator over all local and remote users on this homeserver.
|
||||||
fn iter<'a>(&'a self)
|
fn iter<'a>(&'a self)
|
||||||
-> Box<dyn Iterator<Item = Result<OwnedUserId>> + 'a>;
|
-> Box<dyn Iterator<Item = Result<OwnedUserId>> + 'a>;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue