pub struct ActionRequest {
pub id: Id,
pub created: u128,
pub owner: Id,
pub action_type: ActionType,
pub linked_asset: Id,
pub data: ActionData,
}Fields§
§id: Id§created: u128§owner: Id§action_type: ActionType§linked_asset: IdThe ID of the asset this request links to. Should exist in the correct
table for the given ActionType.
data: ActionDataOptional data attached to the action request.
Implementations§
Source§impl ActionRequest
impl ActionRequest
Sourcepub fn new(
owner: Id,
action_type: ActionType,
linked_asset: Id,
data: Option<ActionData>,
) -> Self
pub fn new( owner: Id, action_type: ActionType, linked_asset: Id, data: Option<ActionData>, ) -> Self
Create a new ActionRequest.
Sourcepub fn with_id(
id: Id,
owner: Id,
action_type: ActionType,
linked_asset: Id,
data: Option<ActionData>,
) -> Self
pub fn with_id( id: Id, owner: Id, action_type: ActionType, linked_asset: Id, data: Option<ActionData>, ) -> Self
Create a new ActionRequest with the given id.
Trait Implementations§
Source§impl Debug for ActionRequest
impl Debug for ActionRequest
Source§impl<'de> Deserialize<'de> for ActionRequest
impl<'de> Deserialize<'de> for ActionRequest
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
Auto Trait Implementations§
impl Freeze for ActionRequest
impl RefUnwindSafe for ActionRequest
impl Send for ActionRequest
impl Sync for ActionRequest
impl Unpin for ActionRequest
impl UnsafeUnpin for ActionRequest
impl UnwindSafe for ActionRequest
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