pub struct Connected {
pub welcome: Welcome,
/* private fields */
}Expand description
A connection past Hello/Welcome, before Attach.
Fields§
§welcome: WelcomeImplementations§
Source§impl Connected
impl Connected
Sourcepub async fn connect(path: &Path, hello: Hello) -> Result<Self, TransportError>
pub async fn connect(path: &Path, hello: Hello) -> Result<Self, TransportError>
Hello/Welcome only. Refused{Version} → TransportError::Version;
any other refusal → Protocol.
pub async fn ping(&mut self) -> Result<Pong, TransportError>
pub async fn sessions(&mut self) -> Result<Vec<SessionMeta>, TransportError>
Sourcepub async fn purge(&mut self) -> Result<Pong, TransportError>
pub async fn purge(&mut self) -> Result<Pong, TransportError>
Purge → the daemon runs memstat::purge_arenas(); replies Pong.
Sourcepub async fn auth_state(
&mut self,
query: AuthStateQuery,
) -> Result<AuthStateReply, TransportError>
pub async fn auth_state( &mut self, query: AuthStateQuery, ) -> Result<AuthStateReply, TransportError>
AuthState → the daemon broker’s in-memory account state. A daemon
that predates the frame is AuthStateReply::DaemonPredates; any
other error is returned as itself.
pub async fn shutdown(&mut self, force: bool) -> Result<(), TransportError>
Sourcepub async fn close(
&mut self,
id: &SessionId,
force: bool,
attached: bool,
) -> Result<String, TransportError>
pub async fn close( &mut self, id: &SessionId, force: bool, attached: bool, ) -> Result<String, TransportError>
Close{id, force, attached}: end one session with host authority.
Ok(text) = the session ended (the actor’s /close reply, with how
to continue it). A refusal (work in flight, clients attached without
attached, daemon reloading) → Refused(text);
no such session → UnknownSession; a daemon that predates Close
→ DaemonTooOld. Waits up to CLOSE_TIMEOUT: the session saves
and runs its end hooks before the daemon answers.
Sourcepub async fn pin(
&mut self,
id: &SessionId,
on: bool,
) -> Result<bool, TransportError>
pub async fn pin( &mut self, id: &SessionId, on: bool, ) -> Result<bool, TransportError>
Pin{id, on}: pin or unpin one session with host authority.
Ok(on) = the session’s pin is now on. A refusal (daemon
reloading, session live in another process) → Refused(text); no
such session → UnknownSession; a daemon that predates Pin →
DaemonTooOld.
Sourcepub async fn reload_extension(
&mut self,
extension: &str,
) -> Result<Result<ExtensionReloadReport, ExtensionReloadFailure>, TransportError>
pub async fn reload_extension( &mut self, extension: &str, ) -> Result<Result<ExtensionReloadReport, ExtensionReloadFailure>, TransportError>
ReloadExtension{extension}: stop that extension and start it again
from what is installed now. Ok(Ok(report)) = reloaded;
Ok(Err(failure)) = the daemon tried and says why not; a refusal
(daemon reloading) → Refused(text); a daemon that predates the
frame → DaemonTooOld.
Auto Trait Implementations§
impl Freeze for Connected
impl RefUnwindSafe for Connected
impl Send for Connected
impl Sync for Connected
impl Unpin for Connected
impl UnsafeUnpin for Connected
impl UnwindSafe for Connected
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
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.