pub struct State {
pub peers: Vec<Peer>,
pub cidrs: Vec<Cidr>,
}Expand description
This model is sent as a response to the /state endpoint, and is meant to include all the data a client needs to update its WireGuard interface.
Fields§
§peers: Vec<Peer>This list will be only the peers visible to the user requesting this information, not including disabled peers or peers from other CIDRs that the user’s CIDR is not authorized to communicate with.
cidrs: Vec<Cidr>At the moment, this is all CIDRs, regardless of whether the peer is eligible to communicate with them or not.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
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
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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