Enum lemmy_apub::fetcher::user_or_community::UserOrCommunity [−][src]
pub enum UserOrCommunity {
User(ApubPerson),
Community(ApubCommunity),
}
Variants
User(ApubPerson)
Tuple Fields
0: ApubPerson
Community(ApubCommunity)
Tuple Fields
Trait Implementations
type DataType = LemmyContext
type ApubType = PersonOrGroup
type TombstoneType = ()
If this object should be refetched after a certain interval, it should return the last refresh time here. This is mainly used to update remote actors. Read more
fn read_from_apub_id<'life0, 'async_trait>(
object_id: Url,
data: &'life0 Self::DataType
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn read_from_apub_id<'life0, 'async_trait>(
object_id: Url,
data: &'life0 Self::DataType
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Try to read the object with given ID from local database. Returns Ok(None) if it doesn’t exist.
Marks the object as deleted in local db. Called when a tombstone is received.
Trait for converting an object or actor into the respective ActivityPub type.
fn verify<'life0, 'life1, 'life2, 'life3, 'async_trait>(
apub: &'life0 Self::ApubType,
expected_domain: &'life1 Url,
data: &'life2 Self::DataType,
request_counter: &'life3 mut i32
) -> Pin<Box<dyn Future<Output = Result<(), LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Converts an object from ActivityPub type to Lemmy internal type. Read more
Auto Trait Implementations
impl RefUnwindSafe for UserOrCommunity
impl Send for UserOrCommunity
impl Sync for UserOrCommunity
impl Unpin for UserOrCommunity
impl UnwindSafe for UserOrCommunity
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Convert self
to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more