pub struct Describe {
pub route: String,
pub profile: String,
pub sees: bool,
pub local: bool,
}Expand description
The route that describes pictures, as the planner needs to know it.
Fields§
§route: StringThe route’s name, for the sentence that names it.
profile: StringThe wire profile on that route, named in a refusal so the reader knows where to look.
sees: boolWhether its route config or manifest claims it can see.
local: boolWhether it points at this machine or the LAN.
Implementations§
Source§impl Describe
impl Describe
Sourcepub fn of(route: &NamedRoute, profiles: &[ProviderProfile]) -> Self
pub fn of(route: &NamedRoute, profiles: &[ProviderProfile]) -> Self
The describe route, as the planner needs to know it, from a route this config declares.
This is the only place local and sees are decided (#356): a caller that builds the
struct field by field can hard-code local: true and nothing in Choice::plan will
notice, which is exactly how allow_cloud came not to fire.
Sourcepub fn resolve(cfg: &Config, profiles: &[ProviderProfile]) -> Option<Self>
pub fn resolve(cfg: &Config, profiles: &[ProviderProfile]) -> Option<Self>
Resolve [vision] route against the routes this config declares.
None when the key is empty or names nothing: a name that matches no route is a load
error elsewhere (Config::validate), and reaching here with one
means a hand-built config in a test, which must behave like “no route set” rather than
panic.
Trait Implementations§
impl Eq for Describe
impl StructuralPartialEq for Describe
Auto Trait Implementations§
impl Forget for Describe
impl Freeze for Describe
impl Move for Describe
impl RefUnwindSafe for Describe
impl Send for Describewhere
RawVecInner: Send,
impl Sync for Describewhere
RawVecInner: Sync,
impl Unpin for Describe
impl UnsafeUnpin for Describe
impl UnwindSafe for Describewhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.