pub struct Resolvers { /* private fields */ }Expand description
The device’s own choice of resolvers (PROP_IP_DNS).
Held as encoded items rather than as parsed addresses because the two families are different widths and a list may mix them, and because what a host wrote is exactly what it reads back.
Implementations§
Source§impl Resolvers
impl Resolvers
pub fn is_empty(&self) -> bool
Sourcepub fn push(&mut self, resolver: &[u8]) -> Result<(), ResolverError>
pub fn push(&mut self, resolver: &[u8]) -> Result<(), ResolverError>
Append one resolver.
Used on its own by the snapshot decoder, which sees the list an option at a time rather than as one value.
Sourcepub fn replace(&mut self, items: &[u8]) -> Result<(), ResolverError>
pub fn replace(&mut self, items: &[u8]) -> Result<(), ResolverError>
Replace the whole list, or refuse it whole.
Whole-list because that is how a small set of resolvers is edited: an operator adds one and removes another in the same breath, and a device left holding half of that would be resolving through a server nobody meant to keep. A candidate is built first so a refusal leaves the old list exactly as it was.
Trait Implementations§
impl Copy for Resolvers
impl Eq for Resolvers
impl StructuralPartialEq for Resolvers
Auto Trait Implementations§
impl Freeze for Resolvers
impl RefUnwindSafe for Resolvers
impl Send for Resolvers
impl Sync for Resolvers
impl Unpin for Resolvers
impl UnwindSafe for Resolvers
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)