pub struct FormationBundle {
pub formation_id: FormationId,
pub member: String,
pub launcher: Option<ProcessIdentity>,
pub entry: bool,
pub verify_key: FormationVerifyKey,
pub calls: Vec<(String, FormationToken)>,
}Expand description
One member’s credentials, as its channel’s first line carries them:
{"formation_id":"frm_…","member":"coder","launcher":{"pid":4242,"process_start":"…"},"verify_key":"<b64url>","calls":[{"name":"reviewer","token":"mft1.…"}]}Every field but launcher is required; calls is empty for a member that may call nobody.
Fields§
§formation_id: FormationId§member: String§launcher: Option<ProcessIdentity>The launcher that started this member, which the member writes into its running record so
mur stop can find the launcher from it. None when the launcher could not read its own
start time, and the line then carries no launcher key.
entry: boolWhether this member is the formation’s entry member, which the member writes into its
running record so mur ps can say which member runs the formation’s task. The line
carries "entry":true only when it is; a line without the key is a peer’s.
verify_key: FormationVerifyKey§calls: Vec<(String, FormationToken)>One token per callee, in roster order.
Implementations§
Source§impl FormationBundle
impl FormationBundle
Sourcepub fn render_line(&self) -> String
pub fn render_line(&self) -> String
The channel’s first line, without its line ending. It carries tokens, and is written to the member’s channel and nowhere else.
Sourcepub fn parse_line(line: &str) -> Result<Self, RuntimeError>
pub fn parse_line(line: &str) -> Result<Self, RuntimeError>
Read a first line. Every token must verify under the line’s own key as issued by its member to the callee it is listed for, in its formation.
The error names the field at fault, by position for a call, and never quotes the line.
Trait Implementations§
Source§impl Clone for FormationBundle
impl Clone for FormationBundle
Auto Trait Implementations§
impl Forget for FormationBundle
impl Freeze for FormationBundle
impl RefUnwindSafe for FormationBundle
impl Send for FormationBundle
impl Sync for FormationBundle
impl Unpin for FormationBundle
impl UnsafeUnpin for FormationBundle
impl UnwindSafe for FormationBundle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more