pub struct Connection { /* private fields */ }Expand description
An open connection from an RPC client.
Tracks information that persists from one request to another.
The client might not have authenticated;
access and permissions control is handled via the capability system.
Specifically, the objects table in Inner hold capabilities
that the client will use to do things,
including an RpcSession.
§In the Arti RPC System
A connection to Arti.
This object is available as soon as you open a connection to Arti RPC,
even before you authenticate. Its ObjectId is always "connection".
Because this object is available before authentication,
it provides only those methods that you need
in order to perform authentication
and receive an RpcSession.
Implementations§
Source§impl Connection
impl Connection
Trait Implementations§
Source§impl Context for Connection
impl Context for Connection
Source§fn lookup_object(&self, id: &ObjectId) -> Result<Arc<dyn Object>, LookupError>
fn lookup_object(&self, id: &ObjectId) -> Result<Arc<dyn Object>, LookupError>
Look up an object by identity within this context.
Source§fn register_owned(&self, object: Arc<dyn Object>) -> ObjectId
fn register_owned(&self, object: Arc<dyn Object>) -> ObjectId
Create an owning reference to
object within this context. Read moreSource§fn release_owned(&self, id: &ObjectId) -> Result<(), LookupError>
fn release_owned(&self, id: &ObjectId) -> Result<(), LookupError>
Drop an owning reference to the object called
object within this context. Read moreSource§fn dispatch_table(&self) -> &Arc<RwLock<DispatchTable>>
fn dispatch_table(&self) -> &Arc<RwLock<DispatchTable>>
Return a dispatch table that can be used to invoke other RPC methods.
Source§impl Object for Connection
impl Object for Connection
Source§fn get_cast_table(&self) -> &CastTable
fn get_cast_table(&self) -> &CastTable
Source§fn expose_outside_of_session(&self) -> bool
fn expose_outside_of_session(&self) -> bool
Return true if this object should be given an identifier that allows it
to be used outside of the session that generated it. Read more
Auto Trait Implementations§
impl !Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> ContextExt for Twhere
T: Context,
impl<T> ContextExt for Twhere
T: Context,
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>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more