pub struct SendActivityTask { /* private fields */ }
Expand description
All info needed to sign and send one activity to one inbox. You should generally use [crate::activity_queue::queue_activity] unless you want implement your own queue.
Implementations§
source§impl SendActivityTask
impl SendActivityTask
sourcepub async fn prepare<Activity, Datatype, ActorType>(
activity: &Activity,
actor: &ActorType,
inboxes: Vec<Url>,
data: &Data<Datatype>
) -> Result<Vec<SendActivityTask>, Error>
pub async fn prepare<Activity, Datatype, ActorType>( activity: &Activity, actor: &ActorType, inboxes: Vec<Url>, data: &Data<Datatype> ) -> Result<Vec<SendActivityTask>, Error>
Prepare an activity for sending
activity
: The activity to be sent, gets converted to jsoninboxes
: List of remote actor inboxes that should receive the activity. Ignores local actor inboxes. Should be built by calling crate::traits::Actor::shared_inbox_or_inbox for each target actor.
Trait Implementations§
source§impl Clone for SendActivityTask
impl Clone for SendActivityTask
source§fn clone(&self) -> SendActivityTask
fn clone(&self) -> SendActivityTask
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SendActivityTask
impl Debug for SendActivityTask
Auto Trait Implementations§
impl !Freeze for SendActivityTask
impl RefUnwindSafe for SendActivityTask
impl Send for SendActivityTask
impl Sync for SendActivityTask
impl Unpin for SendActivityTask
impl UnwindSafe for SendActivityTask
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> 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