pub struct ClientInfo {
pub party_id: PartyId,
pub country_code: CountryCode,
pub role: Role,
pub status: ConnectionStatus,
pub last_updated: DateTime,
pub extensions: Extensions,
}Available on crate feature
v2_2_1 only.Expand description
The connection status of one party at a hub, in OCPI 2.2.1.
Spec: 2.2.1 §mod_hub_client_info_hub_client_info_object
Fields§
§party_id: PartyIdCPO or eMSP ID of this party, as used in the credentials exchange.
country_code: CountryCodeCountry code of the country this party is operating in.
role: RoleThe role of the connected party.
status: ConnectionStatusStatus of the connection to the party.
last_updated: DateTimeTimestamp when this ClientInfo object was last updated.
extensions: ExtensionsUndocumented JSON fields, preserved verbatim.
Implementations§
Source§impl ClientInfo
impl ClientInfo
Sourcepub fn new(
party: PartyRef,
role: Role,
status: ConnectionStatus,
last_updated: DateTime,
) -> Self
pub fn new( party: PartyRef, role: Role, status: ConnectionStatus, last_updated: DateTime, ) -> Self
Creates a client info entry.
Sourcepub fn is_reachable(&self) -> bool
pub fn is_reachable(&self) -> bool
Whether messages can currently be delivered to this party.
Trait Implementations§
Source§impl Clone for ClientInfo
impl Clone for ClientInfo
Source§fn clone(&self) -> ClientInfo
fn clone(&self) -> ClientInfo
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 ClientInfo
impl Debug for ClientInfo
Source§impl<'de> Deserialize<'de> for ClientInfo
impl<'de> Deserialize<'de> for ClientInfo
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 Downgrade<ClientInfo> for ClientInfo
Available on crate feature convert only.
impl Downgrade<ClientInfo> for ClientInfo
Available on crate feature
convert only.Source§fn downgrade(self) -> Converted<ClientInfo>
fn downgrade(self) -> Converted<ClientInfo>
Converts to the older version.
Source§impl JsonSchema for ClientInfo
impl JsonSchema for ClientInfo
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ClientInfo
impl PartialEq for ClientInfo
Source§impl Serialize for ClientInfo
impl Serialize for ClientInfo
impl StructuralPartialEq for ClientInfo
Source§impl Upgrade<ClientInfo> for ClientInfo
Available on crate feature convert only.
impl Upgrade<ClientInfo> for ClientInfo
Available on crate feature
convert only.Source§fn upgrade(self) -> Converted<ClientInfo>
fn upgrade(self) -> Converted<ClientInfo>
Converts to the newer version.
Source§impl Validate for ClientInfo
impl Validate for ClientInfo
Auto Trait Implementations§
impl Freeze for ClientInfo
impl RefUnwindSafe for ClientInfo
impl Send for ClientInfo
impl Sync for ClientInfo
impl Unpin for ClientInfo
impl UnsafeUnpin for ClientInfo
impl UnwindSafe for ClientInfo
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