pub struct SessionHandle {
pub id: SessionId,
/* private fields */
}Fields§
§id: SessionIdImplementations§
Source§impl SessionHandle
impl SessionHandle
Sourcepub fn new(meta: SessionMeta, view: RuntimeView) -> (Self, SessionEndpoints)
pub fn new(meta: SessionMeta, view: RuntimeView) -> (Self, SessionEndpoints)
Mint a handle + the actor’s ends. Used by SessionActor (A1) and the
test EchoActor.
Sourcepub async fn send(&self, cmd: SessionCommand) -> Result<(), TransportError>
pub async fn send(&self, cmd: SessionCommand) -> Result<(), TransportError>
Send a host-originated command (from: None). Backpressure when
the queue is full (never drop silently); Closed once the actor is
gone.
Sourcepub async fn send_from(
&self,
from: ClientId,
cmd: SessionCommand,
) -> Result<(), TransportError>
pub async fn send_from( &self, from: ClientId, cmd: SessionCommand, ) -> Result<(), TransportError>
Send on behalf of an attached client (ownership is enforced by the actor, B1).
Sourcepub fn lifecycle(&self) -> SessionLifecycle
pub fn lifecycle(&self) -> SessionLifecycle
Park/unpark state as last written by the actor.
Sourcepub fn journal_id(&self) -> String
pub fn journal_id(&self) -> String
Current conv.session.id (= id until a LinkedSuccessor compaction).
Sourcepub fn meta_live(&self) -> SessionMeta
pub fn meta_live(&self) -> SessionMeta
meta() with the live cells filled in (lifecycle, clients, owner,
awaiting_input, journal_id) — what listings show.
pub fn subscribe(&self) -> Receiver<Envelope>
Sourcepub fn placeholder_config(&self) -> Option<&SessionConfig>
pub fn placeholder_config(&self) -> Option<&SessionConfig>
F23: the retry config carried by a lock-held placeholder.
pub fn meta(&self) -> &SessionMeta
pub fn view(&self) -> Guard<Arc<RuntimeView>>
Trait Implementations§
Source§impl Clone for SessionHandle
impl Clone for SessionHandle
Auto Trait Implementations§
impl !RefUnwindSafe for SessionHandle
impl !UnwindSafe for SessionHandle
impl Freeze for SessionHandle
impl Send for SessionHandle
impl Sync for SessionHandle
impl Unpin for SessionHandle
impl UnsafeUnpin for SessionHandle
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.