pub struct ProjectionRoute {
pub id: String,
pub path: String,
pub what: String,
pub availability: Availability,
}Expand description
One route the projection answers for itself, as the OpenAPI document, the published site and the Cockpit all show it: where it answers, what it is, and whether a publication can carry it.
This is not a fourth list. Every entry is a surface discover::native_all resolved
from the constants that already declare it, so a prefix that moves moves here, and the
description is the producer’s own title rather than a sentence written beside it.
Fields§
§id: StringThe surface’s identity in the topology.
path: StringWhere it answers.
what: StringOne line: what it is, in the words of the surface that declares it.
availability: AvailabilityWhether the running executable, a publication, or both answer for it.
Implementations§
Source§impl ProjectionRoute
impl ProjectionRoute
Sourcepub fn linkable(&self) -> bool
pub fn linkable(&self) -> bool
May a published page offer this as a link a reader can follow?
A page that a publication carries can link it. A page that only a running process answers cannot: on a published site that link is a promise nothing keeps, and the usual repair — a test on the page’s own address — hides the rule in a template.
use majordomus_cli::web::projection_routes;
let swagger = projection_routes().into_iter().find(|r| r.id == "swagger").unwrap();
assert!(!swagger.linkable(), "no server, no console");Trait Implementations§
Source§impl Clone for ProjectionRoute
impl Clone for ProjectionRoute
Source§fn clone(&self) -> ProjectionRoute
fn clone(&self) -> ProjectionRoute
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProjectionRoute
impl Debug for ProjectionRoute
impl Eq for ProjectionRoute
Source§impl PartialEq for ProjectionRoute
impl PartialEq for ProjectionRoute
Source§fn eq(&self, other: &ProjectionRoute) -> bool
fn eq(&self, other: &ProjectionRoute) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ProjectionRoute
impl Serialize for ProjectionRoute
impl StructuralPartialEq for ProjectionRoute
Auto Trait Implementations§
impl Freeze for ProjectionRoute
impl RefUnwindSafe for ProjectionRoute
impl Send for ProjectionRoute
impl Sync for ProjectionRoute
impl Unpin for ProjectionRoute
impl UnsafeUnpin for ProjectionRoute
impl UnwindSafe for ProjectionRoute
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.