pub enum Purpose {
TokenCreate {
clone_of: Option<(String, String)>,
},
TokenEdit {
id: String,
name: String,
expires: String,
},
TopicCreate,
TopicEdit {
name: String,
was: Vec<(&'static str, String)>,
},
ProfileNew,
ProfileEdit {
original: String,
},
MessagePublish {
topic: String,
},
MessageReceive {
topic: String,
},
MessageVisibility {
topic: String,
id: String,
receipt: String,
},
}Expand description
What the form is for, with what the code needs to carry it out.
Variants§
TokenCreate
clone_of is the id and the name of the token being cloned.
TokenEdit
The id, and the name and expiry the form started with (only what changed is sent).
TopicCreate
TopicEdit
The topic, and the text each editable field started with (only what changed is sent).
ProfileNew
ProfileEdit
MessagePublish
A message to publish to the topic.
MessageReceive
Reading messages of a topic: how many, and how long they stay invisible to the other consumers.
MessageVisibility
A held message: for how long it stays invisible from now on.
Implementations§
Trait Implementations§
impl Eq for Purpose
impl StructuralPartialEq for Purpose
Auto Trait Implementations§
impl Freeze for Purpose
impl RefUnwindSafe for Purpose
impl Send for Purpose
impl Sync for Purpose
impl Unpin for Purpose
impl UnsafeUnpin for Purpose
impl UnwindSafe for Purpose
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,
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
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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