Skip to main content

Change

Enum Change 

Source
pub enum Change {
Show 24 variants Posted(Box<Posted>), JoinedThread(Member), LeftThread(Member), Claimed(Claimed), Released(Released), LeadSet(Member), SettingChanged(SettingChanged), SessionForgotten(Forgotten), SessionStarted(SessionStarted), PauseSet(PauseSet), RiffMade(RiffMade), PersonJoined(PersonJoined), MemberInvited(Email), MemberRemoved(Email), AdminSet(AdminSet), OwnerSet(OwnerSet), OwnerAsked(OwnerAsked), OwnerDenied(Email), SigninsEnded(SigninsEnded), ItemHeld(ItemHeld), ItemFreed(ItemFreed), PlanSet(PlanSet), PlanEnded(PlanEnded), NotesSet(NotesSet),
}
Expand description

What happened.

Variants§

§

Posted(Box<Posted>)

A message, with its seq in its thread and the sessions that it woke.

§

JoinedThread(Member)

A session joined a thread.

§

LeftThread(Member)

A session left a thread. It is no longer the lead there.

§

Claimed(Claimed)

A session took a claim. It replaces the old holder.

§

Released(Released)

A claim is free. The record of the last claim of a worker, made by its own release, says that the worker must clear its context.

§

LeadSet(Member)

A session became the lead of its user in a repository thread.

§

SettingChanged(SettingChanged)

A setting of the riff changed.

§

SessionForgotten(Forgotten)

A session had no sign of life for SESSION_EXPIRY. The state drops it: its read cursors, its memberships, its claims, its lead, and each direct thread whose two sessions are gone.

§

SessionStarted(SessionStarted)

A session started, or came with no new start. The record has the worker mark of the session (01M3X9X9M079WGFPJZHNXH9VEP).

§

PauseSet(PauseSet)

A pause is set or ended: the pause of the whole riff, or the pause of one repository (01M3XAHZG26ECNARX35JD73YXJ).

§

RiffMade(RiffMade)

The riff has its ID. It is the first record of a new log.

§

PersonJoined(PersonJoined)

An email signed in for the first time, and holds its USER.

§

MemberInvited(Email)

An email is a member of the riff.

§

MemberRemoved(Email)

An email is no member of the riff. Each sign-in of its USER from before this record is ended.

§

AdminSet(AdminSet)

An email is an admin that the owner made, or it is not.

§

OwnerSet(OwnerSet)

An email is the owner. With no email, the owner is gone, and the riff has no owner. The request for the owner role ends.

§

OwnerAsked(OwnerAsked)

An admin asks for the owner role.

§

OwnerDenied(Email)

The owner keeps the owner role that an admin asked for.

§

SigninsEnded(SigninsEnded)

Each sign-in of a USER from before this record is ended.

§

ItemHeld(ItemHeld)

A lead holds an item, with a reason: no worker can claim it. A second record for the same item replaces the reason. New in 1.1.0.

§

ItemFreed(ItemFreed)

The hold of an item ends. New in 1.1.0.

§

PlanSet(PlanSet)

The plan of a repository thread: it replaces the plan of the thread. New in 1.3.0.

§

PlanEnded(PlanEnded)

The server forgets the plan of a repository thread. The holds stay. New in 1.3.0.

§

NotesSet(NotesSet)

The notes of the lead of a user in a repository thread: the full text replaces the old text, and the old text stays in the history (01M59258K3TYR09HC4AWHWZPEX).

Implementations§

Source§

impl Change

Source

pub const KINDS: &[&str]

The name of each kind of change, as the JSON of a record has it. The order of the list is not a part of the format: a reader finds a kind by its name. So a new kind can go in at any place.

Source

pub fn kind(&self) -> &'static str

The name of the kind of this change.

Source§

impl Change

Source

pub fn session(&self) -> Option<&SessionUri>

The session URI that this change holds: the session of the change, or the from of the message of a posted change. None for a change with no session URI.

Trait Implementations§

Source§

impl Clone for Change

Source§

fn clone(&self) -> Change

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Change

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Change

Source§

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 Change

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

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

Generates a JSON Schema for this type. Read more
Source§

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 more
Source§

impl PartialEq for Change

Source§

fn eq(&self, other: &Change) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Change

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Change

Source§

impl StructuralPartialEq for Change

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,