pub struct Descriptor {
pub descriptions: Vec<Description>,
pub load_balance: bool,
pub failover: bool,
pub source_route: bool,
}Expand description
A fully parsed connect string: one or more Descriptions.
Fields§
§descriptions: Vec<Description>Member descriptions (one for a plain DESCRIPTION, several for a
DESCRIPTION_LIST or multi-address-list EZConnect).
load_balance: boolDESCRIPTION_LIST LOAD_BALANCE=ON.
failover: boolDESCRIPTION_LIST FAILOVER=OFF.
source_route: boolDESCRIPTION_LIST SOURCE_ROUTE=ON.
Implementations§
Source§impl Descriptor
impl Descriptor
Sourcepub fn first_description(&self) -> &Description
pub fn first_description(&self) -> &Description
The first description (always present for a successfully parsed string).
Sourcepub fn addresses(&self) -> impl Iterator<Item = &Address>
pub fn addresses(&self) -> impl Iterator<Item = &Address>
Iterator over every Address across all descriptions, in order.
Sourcepub fn first_address(&self) -> Option<&Address>
pub fn first_address(&self) -> Option<&Address>
The first address that has a host, if any.
Trait Implementations§
Source§impl Clone for Descriptor
impl Clone for Descriptor
Source§fn clone(&self) -> Descriptor
fn clone(&self) -> Descriptor
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 Descriptor
impl Debug for Descriptor
Source§impl PartialEq for Descriptor
impl PartialEq for Descriptor
Source§fn eq(&self, other: &Descriptor) -> bool
fn eq(&self, other: &Descriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Descriptor
Auto Trait Implementations§
impl Freeze for Descriptor
impl RefUnwindSafe for Descriptor
impl Send for Descriptor
impl Sync for Descriptor
impl Unpin for Descriptor
impl UnsafeUnpin for Descriptor
impl UnwindSafe for Descriptor
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