Struct mesh_portal_api_server::Portal
source · [−]pub struct Portal {
pub info: PortalInfo,
pub config: PortalConfig,
pub log: fn(log: Log),
/* private fields */
}Fields
info: PortalInfoconfig: PortalConfiglog: fn(log: Log)Implementations
sourceimpl Portal
impl Portal
pub fn new(
info: PortalInfo,
config: PortalConfig,
outlet_tx: Sender<Frame>,
request_handler: Arc<dyn PortalRequestHandler>,
broadcast_tx: Sender<PortalEvent>,
logger: fn(log: Log)
) -> (Self, Sender<Frame>)
pub fn api(&self) -> PortalApi
pub async fn handle_request(&self, request: Request) -> Response
pub fn assign(&self, assign: Assign)
pub fn shutdown(&mut self)
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Portal
impl Send for Portal
impl Sync for Portal
impl Unpin for Portal
impl !UnwindSafe for Portal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
pub fn extract_context(self, _original_input: I)
pub fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. Read more
impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
pub fn recreate_context(_original_input: I, tail: I) -> I
pub fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more