pub enum Actor {
Agent(Agent),
Group(Group),
}Expand description
Variants§
Implementations§
Source§impl Actor
impl Actor
Sourcepub fn from_json_obj(map: Map<String, Value>) -> Result<Self, DataError>
pub fn from_json_obj(map: Map<String, Value>) -> Result<Self, DataError>
Construct and validate an Actor from a JSON Object.
Sourcepub fn from_agent(actor: Agent) -> Self
pub fn from_agent(actor: Agent) -> Self
Sourcepub fn from_group(actor: Group) -> Self
pub fn from_group(actor: Group) -> Self
Sourcepub fn name_as_str(&self) -> Option<&str>
pub fn name_as_str(&self) -> Option<&str>
Return name field as a string reference if set; None otherwise.
Sourcepub fn mbox(&self) -> Option<&MyEmailAddress>
pub fn mbox(&self) -> Option<&MyEmailAddress>
Return mbox field if set; None otherwise.
Sourcepub fn mbox_sha1sum(&self) -> Option<&str>
pub fn mbox_sha1sum(&self) -> Option<&str>
Return mbox_sha1sum field (hex-encoded SHA1 hash of this entity’s
mbox URI) if set; None otherwise.
Sourcepub fn openid(&self) -> Option<&UriStr>
pub fn openid(&self) -> Option<&UriStr>
Return openid field (openID URI of this entity) if set; None
otherwise.
Sourcepub fn account(&self) -> Option<&Account>
pub fn account(&self) -> Option<&Account>
Return account field (reference to this entity’s Account) if set;
None otherwise.
Sourcepub fn equivalent(&self, that: &Actor) -> bool
pub fn equivalent(&self, that: &Actor) -> bool
Return TRUE if this is Equivalent to that; FALSE otherwise.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Actor
impl<'de> Deserialize<'de> for Actor
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Fingerprint for Actor
impl Fingerprint for Actor
Source§impl Validate for Actor
impl Validate for Actor
Source§fn validate(&self) -> Vec<ValidationError>
fn validate(&self) -> Vec<ValidationError>
Validate the instance and return a potentially empty collection of
ValidationError.
Source§fn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Convenience method to quickly assert if the type implementing this
trait is indeed valid. Read more
Source§fn check_validity(&self) -> Result<(), ValidationError>
fn check_validity(&self) -> Result<(), ValidationError>
Convenience method that checks the validity of a Validate instance and
raises a ValidationError if it was found to be invalid.
impl StructuralPartialEq for Actor
Auto Trait Implementations§
impl Freeze 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,
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> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.