pub struct BambooServer { /* private fields */ }Expand description
Main Bamboo server instance
Implementations§
Source§impl BambooServer
impl BambooServer
Sourcepub fn new_with_data_dir(config: Config, data_dir: PathBuf) -> Self
pub fn new_with_data_dir(config: Config, data_dir: PathBuf) -> Self
Create a new Bamboo server with an explicit data directory.
Sourcepub async fn start(self) -> Result<()>
pub async fn start(self) -> Result<()>
Start the HTTP server (blocking).
Delegates to the appropriate server entrypoint based on the configuration:
- If
static_diris set, serves static files alongside the API (Docker mode). - Otherwise, runs the API server with the configured bind address and port.
This method blocks until the server shuts down.
Sourcepub fn server_addr(&self) -> String
pub fn server_addr(&self) -> String
Get the server address
Auto Trait Implementations§
impl Freeze for BambooServer
impl RefUnwindSafe for BambooServer
impl Send for BambooServer
impl Sync for BambooServer
impl Unpin for BambooServer
impl UnsafeUnpin for BambooServer
impl UnwindSafe for BambooServer
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