pub struct Console { /* private fields */ }Expand description
AVL Console - Main application structure
Manages the entire console lifecycle including:
- HTTP server with Axum
- WebSocket connections for real-time updates
- Authentication and authorization
- Resource management (databases, storage, etc.)
Implementations§
Source§impl Console
impl Console
Sourcepub async fn new(config: ConsoleConfig) -> Result<Self>
pub async fn new(config: ConsoleConfig) -> Result<Self>
Create a new Console instance
§Example
let config = ConsoleConfig::default();
let console = Console::new(config).await?;Sourcepub async fn serve(self, addr: impl Into<SocketAddr>) -> Result<()>
pub async fn serve(self, addr: impl Into<SocketAddr>) -> Result<()>
Start the console server
§Example
let console = Console::new(ConsoleConfig::default()).await?;
let addr: SocketAddr = "127.0.0.1:8080".parse()?;
console.serve(addr).await?;Sourcepub fn config(&self) -> &ConsoleConfig
pub fn config(&self) -> &ConsoleConfig
Get configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Console
impl !RefUnwindSafe for Console
impl Send for Console
impl Sync for Console
impl Unpin for Console
impl !UnwindSafe for Console
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