pub struct PublishedKind {
pub kind: String,
pub projection: String,
pub route: Option<String>,
pub reason: Option<String>,
}Expand description
How one kind reaches the public site, as the declaration states it.
use majordomus_cli::entity::{Publication, PublishedKind};
let p = Publication::parse(
"[[kinds]]\nkind = \"adr\"\nprojection = \"entity\"\nroute = \"/adrs/\"\n",
None,
);
let adr: &PublishedKind = p.kind("adr").unwrap();
assert_eq!(adr.projection, "entity");
assert_eq!(adr.route.as_deref(), Some("/adrs/"));
assert_eq!(adr.reason, None);
assert!(p.kind("rule").is_none());Fields§
§kind: StringThe kind, as the index reports it.
projection: Stringentity (a page per object under route), section (an editorial section at
route publishes the kind) or none (not published, for reason).
route: Option<String>The public index of the kind, for entity and section.
reason: Option<String>Why the kind is not published, for none.
Trait Implementations§
Source§impl Clone for PublishedKind
impl Clone for PublishedKind
Source§fn clone(&self) -> PublishedKind
fn clone(&self) -> PublishedKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PublishedKind
impl Debug for PublishedKind
Source§impl Default for PublishedKind
impl Default for PublishedKind
Source§fn default() -> PublishedKind
fn default() -> PublishedKind
Returns the “default value” for a type. Read more
impl Eq for PublishedKind
Source§impl PartialEq for PublishedKind
impl PartialEq for PublishedKind
Source§fn eq(&self, other: &PublishedKind) -> bool
fn eq(&self, other: &PublishedKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PublishedKind
Auto Trait Implementations§
impl Freeze for PublishedKind
impl RefUnwindSafe for PublishedKind
impl Send for PublishedKind
impl Sync for PublishedKind
impl Unpin for PublishedKind
impl UnsafeUnpin for PublishedKind
impl UnwindSafe for PublishedKind
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<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.