pub struct EmberServer { /* private fields */ }Expand description
An Ember+ server (provider).
Implementations§
Source§impl EmberServer
impl EmberServer
Sourcepub async fn bind(address: &str) -> Result<Self>
pub async fn bind(address: &str) -> Result<Self>
Create a new server bound to the given address.
Sourcepub async fn bind_with_config(
address: &str,
config: ServerConfig,
) -> Result<Self>
pub async fn bind_with_config( address: &str, config: ServerConfig, ) -> Result<Self>
Create a new server with custom configuration.
Sourcepub fn set_value_handler(&mut self, handler: SetValueHandler)
pub fn set_value_handler(&mut self, handler: SetValueHandler)
Set the setValue handler.
Sourcepub fn invoke_handler(&mut self, handler: InvokeHandler)
pub fn invoke_handler(&mut self, handler: InvokeHandler)
Set the invoke handler.
Sourcepub fn matrix_handler(&mut self, handler: MatrixHandler)
pub fn matrix_handler(&mut self, handler: MatrixHandler)
Set the matrix handler.
Sourcepub async fn add_root(&self, node: TreeNode) -> TreeNodeRef
pub async fn add_root(&self, node: TreeNode) -> TreeNodeRef
Add a root-level node to the tree.
Sourcepub async fn tree(&self) -> RwLockWriteGuard<'_, EmberTree>
pub async fn tree(&self) -> RwLockWriteGuard<'_, EmberTree>
Get the tree for modification.
Auto Trait Implementations§
impl Freeze for EmberServer
impl !RefUnwindSafe for EmberServer
impl Send for EmberServer
impl Sync for EmberServer
impl Unpin for EmberServer
impl UnsafeUnpin for EmberServer
impl !UnwindSafe for EmberServer
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