[−][src]Struct roughenough::server::Server
The main Roughenough server instance.
The ServerConfig trait specifies the required and optional parameters available for configuring a Roughenoguh server instance.
Implementations of ServerConfig
obtain configurations from different back-end sources
such as files or environment variables.
See the config module for more information.
Methods
impl Server
[src]
pub fn new(config: Box<dyn ServerConfig>) -> Server
[src]
Create a new server instance from the provided
ServerConfig
trait object instance.
pub fn get_public_key(&self) -> &str
[src]
Returns a reference to the server's long-term public key
pub fn get_online_key(&self) -> &OnlineKey
[src]
Returns a reference to the server's on-line (delegated) key
pub fn get_config(&self) -> &dyn ServerConfig
[src]
Returns a reference to the ServerConfig
this server was configured with
pub fn get_keep_running(&self) -> Arc<AtomicBool>
[src]
Returns a reference counted pointer the this server's keep_running
value.
pub fn process_events(&mut self, events: &mut Events) -> bool
[src]
The main processing function for incoming connections. This method should be called repeatedly in a loop to process requests. It returns 'true' when the server has shutdown (due to keep_running being set to 'false').
Auto Trait Implementations
impl !RefUnwindSafe for Server
impl !Send for Server
impl !Sync for Server
impl Unpin for Server
impl !UnwindSafe for Server
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,