pub struct RpcServer<T: RpcTransport + 'static> { /* private fields */ }Implementations§
Source§impl<T: RpcTransport + 'static> RpcServer<T>
impl<T: RpcTransport + 'static> RpcServer<T>
pub fn new( transport: Arc<T>, caller_actor: impl Into<String>, enforcer: Arc<dyn CapabilityEnforcer>, ) -> Self
pub fn register_unary( &self, method: impl Into<String>, capability: impl Into<String>, handler: UnaryHandler, )
pub fn register_stream( &self, method: impl Into<String>, capability: impl Into<String>, handler: StreamHandler, )
pub fn register_subscribe( &self, method: impl Into<String>, capability: impl Into<String>, handler: SubscribeHandler, )
pub fn register_client_stream( &self, method: impl Into<String>, capability: impl Into<String>, handler: ClientStreamHandler, )
pub fn register_bidi( &self, method: impl Into<String>, capability: impl Into<String>, handler: BidiHandler, )
pub fn register_command_channel( &self, method: impl Into<String>, capability: impl Into<String>, handler: CommandChannelHandler, initial_credit: u32, )
pub fn register_bulk_transfer( &self, method: impl Into<String>, capability: impl Into<String>, handler: BulkTransferHandler, )
pub fn register_telemetry( &self, method: impl Into<String>, capability: impl Into<String>, handler: TelemetryHandler, priority: StreamingPriority, )
pub fn register_remote_shell( &self, method: impl Into<String>, capability: impl Into<String>, handler: RemoteShellHandler, )
pub fn register_agent_session( &self, method: impl Into<String>, capability: impl Into<String>, handler: AgentSessionHandler, )
pub fn register_http_bridge( &self, method: impl Into<String>, capability: impl Into<String>, handler: HttpBridgeHandler, )
pub fn caller_actor(&self) -> &str
pub fn transport(&self) -> &Arc<T> ⓘ
pub fn enforcer(&self) -> &Arc<dyn CapabilityEnforcer> ⓘ
Source§impl<T: RpcTransport + 'static> RpcServer<T>
impl<T: RpcTransport + 'static> RpcServer<T>
Run the CapabilityEnforcer against a synthetic call without going through the transport — useful for CLI tooling and tests that want to confirm what the server would decide for a given (caller, method, capability) triple.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for RpcServer<T>
impl<T> !UnwindSafe for RpcServer<T>
impl<T> Freeze for RpcServer<T>
impl<T> Send for RpcServer<T>
impl<T> Sync for RpcServer<T>
impl<T> Unpin for RpcServer<T>
impl<T> UnsafeUnpin for RpcServer<T>
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> 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