pub struct AdminServer { /* private fields */ }Expand description
Admin server
This server is protected by the admin auth middleware.
When dropped, the server will stop.
Implementations§
Source§impl AdminServer
impl AdminServer
Sourcepub async fn from_data_dir(
data_dir: PersistentDataDir,
) -> Result<Self, AdminServerBuildError>
pub async fn from_data_dir( data_dir: PersistentDataDir, ) -> Result<Self, AdminServerBuildError>
Create a new admin server from a data directory.
Sourcepub async fn from_data_dir_path(
data_dir_path: PathBuf,
) -> Result<Self, AdminServerBuildError>
pub async fn from_data_dir_path( data_dir_path: PathBuf, ) -> Result<Self, AdminServerBuildError>
Create a new admin server from a data directory path.
Sourcepub async fn start(context: &AppContext) -> Result<Self, AdminServerBuildError>
pub async fn start(context: &AppContext) -> Result<Self, AdminServerBuildError>
Run the admin server.
Sourcepub fn listen_socket(&self) -> SocketAddr
pub fn listen_socket(&self) -> SocketAddr
Get the socket address of the admin server.
Sourcepub async fn create_signup_token(&self) -> Result<String>
pub async fn create_signup_token(&self) -> Result<String>
Create a signup token for the given homeserver.
Trait Implementations§
Source§impl Drop for AdminServer
impl Drop for AdminServer
Auto Trait Implementations§
impl Freeze for AdminServer
impl RefUnwindSafe for AdminServer
impl Send for AdminServer
impl Sync for AdminServer
impl Unpin for AdminServer
impl UnsafeUnpin for AdminServer
impl UnwindSafe for AdminServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more