pub enum Who {
City,
Person,
Resident(Address),
}Expand description
The three parties a ledger line can be attributed to.
Every line of every history carries one of these, and until this
type existed each writer spelled its own: six call sites wrote the
literal "city" and a resident wrote its address, so a seventh
spelling was one keystroke away and nothing would have refused it.
The wire form is what the histories already hold. The city is
city, a person is person, and a resident is its address, exactly
as before; no ledger on disk has to be re-spelled for this type to
read it.
Variants§
City
The city’s desk: genesis, dispatch, truncation, relaying.
Person
A person, through a client.
Resident(Address)
A resident of a building, at the address it is known by.
Implementations§
Source§impl Who
impl Who
Sourcepub fn resident(addr: Address) -> Result<Who, AxError>
pub fn resident(addr: Address) -> Result<Who, AxError>
A resident’s attribution.
§Errors
E_INVALID_ARGS for an address spelled city or person:
those two words are the other two parties on this wire, and a
resident answering to one of them would make a line’s author
unreadable.
Sourcepub fn handed_down_by(
&self,
predecessor: Option<RunId>,
parent: Option<RunId>,
) -> String
pub fn handed_down_by( &self, predecessor: Option<RunId>, parent: Option<RunId>, ) -> String
Who handed a piece of work down, in the words a model reads in
its job file and its opening message (crates/city/spec/SpineFiles.lean
D21).
A resident is named with the run that handed the work down: the predecessor when this is a succession, otherwise the delegating parent; a knock has neither and names the address alone. Spelled here because the city’s dispatch writes the job file and the runtime writes the opening message, and both must say the same.