pub struct ServerInformation {
pub server_id: String,
pub version: String,
pub proto: Option<usize>,
pub go: String,
pub host: String,
pub port: u64,
pub auth_required: bool,
pub tls_required: bool,
pub max_payload: u64,
pub client_id: Option<usize>,
pub connect_urls: Option<Vec<String>>,
pub nonce: Option<String>,
}
Expand description
Represents a NATS server information message, defined according to the NATS protocol documentation:
INFO {["option_name":option_value],...}
Fields§
§server_id: String
§version: String
§proto: Option<usize>
§go: String
§host: String
§port: u64
§auth_required: bool
§tls_required: bool
§max_payload: u64
§client_id: Option<usize>
§connect_urls: Option<Vec<String>>
§nonce: Option<String>
Implementations§
Source§impl ServerInformation
impl ServerInformation
Sourcepub fn new(
server_id: String,
version: String,
proto: Option<usize>,
go: String,
host: String,
port: u64,
auth_required: bool,
tls_required: bool,
max_payload: u64,
client_id: Option<usize>,
connect_urls: Option<Vec<String>>,
nonce: Option<String>,
) -> ServerInformation
pub fn new( server_id: String, version: String, proto: Option<usize>, go: String, host: String, port: u64, auth_required: bool, tls_required: bool, max_payload: u64, client_id: Option<usize>, connect_urls: Option<Vec<String>>, nonce: Option<String>, ) -> ServerInformation
Constructor to create a new server information
Trait Implementations§
Source§impl Clone for ServerInformation
impl Clone for ServerInformation
Source§fn clone(&self) -> ServerInformation
fn clone(&self) -> ServerInformation
Returns a copy of the value. Read more
1.0.0 · 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 ServerInformation
impl Debug for ServerInformation
Source§impl<'de> Deserialize<'de> for ServerInformation
impl<'de> Deserialize<'de> for ServerInformation
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 Display for ServerInformation
impl Display for ServerInformation
Source§impl FromStr for ServerInformation
impl FromStr for ServerInformation
Source§impl PartialEq for ServerInformation
impl PartialEq for ServerInformation
Source§impl Serialize for ServerInformation
impl Serialize for ServerInformation
impl StructuralPartialEq for ServerInformation
Auto Trait Implementations§
impl Freeze for ServerInformation
impl RefUnwindSafe for ServerInformation
impl Send for ServerInformation
impl Sync for ServerInformation
impl Unpin for ServerInformation
impl UnwindSafe for ServerInformation
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