Struct qrpc_sdk::Service [−][src]
A service representation on the qrpc system
Use this struct to handle RPC connections to the network, and to update any data you want your service to broadcast to other participants on the QRPC system.
Fields
name: String
version: u16
description: String
Implementations
impl Service
[src]
pub fn new<S: Into<String>>(name: S, version: u16, description: S) -> Self
[src]
Create a new service without hash_id
The hash_id
field will be filled in by the remote RPC server
after calling register()
.
pub async fn register(&mut self, socket: Arc<RpcSocket>) -> RpcResult<Identity>
[src]
Register this service with the RPC broker/ libqaul
pub fn hash_id(&self) -> Option<Identity>
[src]
Get the hash_id
field of this service, if it’s set
pub fn get_socket(&self) -> Arc<RpcSocket>
[src]
Get the RpcSocket for this service
This function is called by other component SDKs to get access to the underlying RPC socket.
Auto Trait Implementations
impl !RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl !UnwindSafe for Service
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,