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§
Methods from Deref<Target = Node>§
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 PartialEq for Instance
impl PartialEq for Instance
source§impl PartialOrd for Instance
impl PartialOrd for Instance
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Instance
Auto Trait Implementations§
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