[−][src]Struct qrpc_sdk::Service
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]
&'_ mut self,
socket: Arc<RpcSocket>
) -> RpcResult<Identity>
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
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
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.
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>,