pub struct Page {
pub kind: SubjectKind,
pub subject: String,
pub path: String,
}Expand description
One page the site renders for a subject.
use majordomus_cli::evidence::subject::{self, Page, SubjectKind};
use majordomus_cli::synthetic::SyntheticRepository;
let repo = SyntheticRepository::small().unwrap();
let ctx = repo.context().unwrap();
let pages: Vec<Page> = subject::index(&ctx.index, &ctx.product, &ctx.registry).pages();
assert!(pages.iter().all(|p| p.path.starts_with("/evidence/")));
assert!(pages.iter().all(|p| p.kind != SubjectKind::Mcp), "an alias has no page");Fields§
§kind: SubjectKindThe subject’s kind.
subject: StringThe subject’s key.
path: StringThe page’s path on the site.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Page
impl<'de> Deserialize<'de> for Page
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
impl Eq for Page
impl StructuralPartialEq for Page
Auto Trait Implementations§
impl Freeze for Page
impl RefUnwindSafe for Page
impl Send for Page
impl Sync for Page
impl Unpin for Page
impl UnsafeUnpin for Page
impl UnwindSafe for Page
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
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
Compare self to
key and return true if they are equal.