pub struct Instance {
pub app: String,
pub peer: Peer,
}Available on crate feature
dns only.Expand description
The result type of _instances.internal TXT queries.
Querying _instances.internal returns every Peer across all your
organization’s apps.
use flytrap::{Instance, Region};
let result = "instance=148e21dad76789,app=flytrap,ip=fdaa:2:224b:a7b:2dbb:3e15:aaea:2,region=sea";
let instance: Instance = result.parse()?;
assert_eq!(
instance,
Instance::new(
"flytrap",
"148e21dad76789",
Region::Seattle,
"fdaa:2:224b:a7b:2dbb:3e15:aaea:2".parse()?,
)
);Fields§
§app: String§peer: PeerImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Instance
impl<'de> Deserialize<'de> for Instance
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 Ord for Instance
impl Ord for Instance
Source§impl PartialOrd for Instance
impl PartialOrd for Instance
impl Eq for Instance
Auto Trait Implementations§
impl Freeze for Instance
impl RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnwindSafe for Instance
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.