pub struct WitnessBatch {
pub round: u32,
pub questions: Vec<BatchedQuestion>,
}Expand description
One round’s questions to one witness, as it is sent them (0.104)
render writes the witness’s user turn: a heading for
the round, then a heading per seat (in CouncilSeat::ALL order) and
that seat’s questions in the order asked, each opening with its id,
its later lines indented under it, every line quoted, and a blank
quoted line between questions:
## Questions from the Council (round 2)
### Artist
> 1. Which model are you?
>
> 3. Two lines:
> the second line.
### Lawyer
> 2. Who operates you?Ids run across the item, so one seat’s may skip. Every line of a
question is quoted, so a seat’s words cannot start a heading. A line
of a question that itself starts like an id (3.) is written with a
backslash before the . (3\.), and parse removes
it, so a batch reads back exactly as it was rendered. A batch is not
bounded by one Agora DM: a transport that sends it as DMs may need to
split it across several, in order.
Fields§
§round: u32§questions: Vec<BatchedQuestion>In the order asked
Implementations§
Source§impl WitnessBatch
impl WitnessBatch
Sourcepub fn parse(text: &str) -> Option<Self>
pub fn parse(text: &str) -> Option<Self>
A rendered batch read back: its questions in the order rendered
(seat by seat). None if text is not one.
Sourcepub fn get(&self, id: WitnessQuestionId) -> Option<&BatchedQuestion>
pub fn get(&self, id: WitnessQuestionId) -> Option<&BatchedQuestion>
The question id, if it is in this batch
Trait Implementations§
Source§impl Clone for WitnessBatch
impl Clone for WitnessBatch
Source§impl Debug for WitnessBatch
impl Debug for WitnessBatch
impl Eq for WitnessBatch
Source§impl PartialEq for WitnessBatch
impl PartialEq for WitnessBatch
impl StructuralPartialEq for WitnessBatch
Auto Trait Implementations§
impl Freeze for WitnessBatch
impl RefUnwindSafe for WitnessBatch
impl Send for WitnessBatch
impl Sync for WitnessBatch
impl Unpin for WitnessBatch
impl UnsafeUnpin for WitnessBatch
impl UnwindSafe for WitnessBatch
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,
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.