pub struct ServiceInfo {
pub name: String,
pub service_type: ServiceType,
pub domain_name: String,
pub port_info: String,
pub status: ServiceState,
pub description: Option<String>,
/* private fields */
}Expand description
Basic service information
Fields§
§name: StringService name
service_type: ServiceTypeService type. Turn service is a collection of STUN and TURN
domain_name: String§port_info: String§status: ServiceStateService status
description: Option<String>Service description
Implementations§
Source§impl ServiceInfo
impl ServiceInfo
Sourcepub fn new_raw(
name: impl Into<String>,
service_type: ServiceType,
domain_name: String,
port_info: String,
description: Option<String>,
) -> Self
pub fn new_raw( name: impl Into<String>, service_type: ServiceType, domain_name: String, port_info: String, description: Option<String>, ) -> Self
Create a ServiceInfo with explicit domain/port (no config needed).
pub fn new( name: impl Into<String>, service_type: ServiceType, description: Option<String>, config: &ActrixConfig, ) -> Self
Sourcepub fn set_counters(&mut self, counters: Arc<ServiceCounters>)
pub fn set_counters(&mut self, counters: Arc<ServiceCounters>)
Attach live counters to this service.
Sourcepub fn counters(&self) -> Option<&Arc<ServiceCounters>>
pub fn counters(&self) -> Option<&Arc<ServiceCounters>>
Get the live counters (if set).
Sourcepub fn set_running(&mut self, url: Url)
pub fn set_running(&mut self, url: Url)
Set service status to running
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if service is running
Trait Implementations§
Source§impl Clone for ServiceInfo
impl Clone for ServiceInfo
Source§fn clone(&self) -> ServiceInfo
fn clone(&self) -> ServiceInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceInfo
impl Debug for ServiceInfo
Source§impl<'de> Deserialize<'de> for ServiceInfo
impl<'de> Deserialize<'de> for ServiceInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ServiceInfo> for ServiceStatus
Convert ServiceInfo to proto ServiceStatus
impl From<&ServiceInfo> for ServiceStatus
Convert ServiceInfo to proto ServiceStatus
Source§fn from(service_info: &ServiceInfo) -> Self
fn from(service_info: &ServiceInfo) -> Self
Converts to this type from the input type.
Source§impl From<ServiceInfo> for ServiceStatus
Convert ServiceInfo to proto ServiceStatus (owned version)
impl From<ServiceInfo> for ServiceStatus
Convert ServiceInfo to proto ServiceStatus (owned version)
Source§fn from(service_info: ServiceInfo) -> Self
fn from(service_info: ServiceInfo) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ServiceInfo
impl !UnwindSafe for ServiceInfo
impl Freeze for ServiceInfo
impl Send for ServiceInfo
impl Sync for ServiceInfo
impl Unpin for ServiceInfo
impl UnsafeUnpin for ServiceInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request