pub struct ActionNeed {
pub kind: ActionKind,
pub field: Option<String>,
pub privileged: bool,
}Expand description
What one invocation of an action is, for the grants deciding it: its kind,
the one field of its resource it writes when it writes only one (a reply
writes the comments), which places it below that field in the tree, and
whether it is privileged (RiskLevel::Privileged): it exercises
authority over the workspace or others in it, so the person’s own grants must
allow it (tilo_action_policy::Verdict::privileged).
Fields§
§kind: ActionKind§field: Option<String>§privileged: boolImplementations§
Source§impl ActionNeed
impl ActionNeed
Sourcepub const fn of(kind: ActionKind) -> Self
pub const fn of(kind: ActionKind) -> Self
An action of kind on the resource as a whole.
Sourcepub fn comments() -> Self
pub fn comments() -> Self
An undoable change of the resource’s comments: what someone who may only comment may do.
Sourcepub fn reactions() -> Self
pub fn reactions() -> Self
An undoable change of reactions, wherever they are: what someone who may only comment may do too.
Sourcepub fn moderation() -> Self
pub fn moderation() -> Self
An undoable change under the resource’s moderation node: acting on
other people’s content, which Moderators and the owner may do.
Trait Implementations§
Source§impl Clone for ActionNeed
impl Clone for ActionNeed
Source§impl Debug for ActionNeed
impl Debug for ActionNeed
Source§impl<'de> Deserialize<'de> for ActionNeed
impl<'de> Deserialize<'de> for ActionNeed
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ActionNeed
Source§impl Hash for ActionNeed
impl Hash for ActionNeed
Source§impl PartialEq for ActionNeed
impl PartialEq for ActionNeed
Source§impl Serialize for ActionNeed
impl Serialize for ActionNeed
impl StructuralPartialEq for ActionNeed
Auto Trait Implementations§
impl Forget for ActionNeed
impl Freeze for ActionNeed
impl Move for ActionNeed
impl RefUnwindSafe for ActionNeed
impl Send for ActionNeed
impl Sync for ActionNeed
impl Unpin for ActionNeed
impl UnsafeUnpin for ActionNeed
impl UnwindSafe for ActionNeed
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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