pub struct AppServer { /* private fields */ }Implementations§
Source§impl AppServer
impl AppServer
Sourcepub async fn start(spaces_root: PathBuf) -> Option<Self>
pub async fn start(spaces_root: PathBuf) -> Option<Self>
Bind (preferring 8642, falling back to an ephemeral port) and start
serving spaces_root in a background task. None if even :0 fails.
pub const fn port(&self) -> u16
Sourcepub fn set_public_base(&mut self, base: Option<String>)
pub fn set_public_base(&mut self, base: Option<String>)
Set the externally reachable base URL used in generated app links.
None restores the local URL. The value is trimmed of trailing /.
Sourcepub fn app_url(&self, uuid: &str) -> String
pub fn app_url(&self, uuid: &str) -> String
The app URL for a registry UUID. A host/tunnel base uses the public
capability /apps/<uuid>/ route; local links keep the historical
direct app-server shape.
Sourcepub fn public_base(&self) -> Option<&str>
pub fn public_base(&self) -> Option<&str>
The public base currently used in generated links, if any.
pub const fn registry(&self) -> &AppRegistry
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppServer
impl RefUnwindSafe for AppServer
impl Send for AppServer
impl Sync for AppServer
impl Unpin for AppServer
impl UnsafeUnpin for AppServer
impl UnwindSafe for AppServer
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.