pub enum Actor {
Member(MemberId),
Automation(AutomationId),
App(AppId),
Visitor(String),
}Expand description
Who made a change: a member, an automation running for one, or an app acting by itself.
Variants§
Member(MemberId)
Automation(AutomationId)
App(AppId)
An app changing its own resources: a trigger it declares, or a migration of its package.
Visitor(String)
Someone with no identity in the workspace, by the key (hex) their page made and signs
each call with: a visitor at a public entry. It is no member and holds only what the
workspace opens to any key (crate::Grantee::AnyKey).
Implementations§
Source§impl Actor
impl Actor
pub fn member(member: MemberId) -> Actor
pub fn automation(id: impl Into<String>) -> Actor
Sourcepub fn grantee(&self) -> Option<Grantee>
pub fn grantee(&self) -> Option<Grantee>
The grantee a grant names this actor by, when it is a member: an automation is its owner’s.
Sourcepub fn actor_bytes(&self) -> Vec<u8> ⓘ
pub fn actor_bytes(&self) -> Vec<u8> ⓘ
The bytes a document names this actor’s changes by: a member’s
MemberId::actor_bytes, an automation’s automation:<id>.
Sourcepub fn of_actor_bytes(bytes: &[u8]) -> Option<Actor>
pub fn of_actor_bytes(bytes: &[u8]) -> Option<Actor>
The actor whose changes a document names by bytes (Self::actor_bytes); None for
bytes no actor writes as.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Actor
impl<'de> Deserialize<'de> for Actor
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Actor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Actor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Actor
Source§impl Ord for Actor
impl Ord for Actor
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Actor
impl PartialOrd for Actor
Source§impl Serialize for Actor
impl Serialize for Actor
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Actor
Auto Trait Implementations§
impl Forget for Actor
impl Freeze for Actor
impl Move for Actor
impl RefUnwindSafe for Actor
impl Send for Actor
impl Sync for Actor
impl Unpin for Actor
impl UnsafeUnpin for Actor
impl UnwindSafe for Actor
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,
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> ⓘ
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