pub struct PlanSet {
pub thread: ThreadName,
pub plan: Plan,
}Expand description
The plan of one repository thread (01M4A4YTNSJR0R1T9JNXPBSKHC): the full plan, so the record replaces the plan of the thread. The design is in the book: “Design: the plan on the server”.
use riff_core::record::{Change, Plan, PlanEnded, PlanItem, PlanSet, Wave};
let set = Change::PlanSet(PlanSet {
thread: "como-technologies/riff".parse()?,
plan: Plan {
wave: Some(Wave { number: 19, title: "Wave 19".into() }),
items: vec![
PlanItem { item: "issue-366".into(), needs: vec![] },
PlanItem { item: "issue-459".into(), needs: vec!["issue-416".into()] },
],
done: vec!["issue-416".into()],
},
});
assert_eq!(
serde_json::to_string(&set).unwrap(),
r#"{"plan_set":{"thread":"como-technologies/riff","wave":{"number":19,"title":"Wave 19"},"items":[{"item":"issue-366","needs":[]},{"item":"issue-459","needs":["issue-416"]}],"done":["issue-416"]}}"#
);
let ended = Change::PlanEnded(PlanEnded { thread: "como-technologies/riff".parse()? });
assert_eq!(
serde_json::to_string(&ended).unwrap(),
r#"{"plan_ended":{"thread":"como-technologies/riff"}}"#
);Fields§
§thread: ThreadName§plan: PlanTrait Implementations§
Source§impl<'de> Deserialize<'de> for PlanSet
impl<'de> Deserialize<'de> for PlanSet
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
Source§impl JsonSchema for PlanSet
impl JsonSchema for PlanSet
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl Eq for PlanSet
impl StructuralPartialEq for PlanSet
Auto Trait Implementations§
impl Freeze for PlanSet
impl RefUnwindSafe for PlanSet
impl Send for PlanSet
impl Sync for PlanSet
impl Unpin for PlanSet
impl UnsafeUnpin for PlanSet
impl UnwindSafe for PlanSet
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
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.