pub struct CreateComment<T> {
pub reply_to: T,
pub body: String,
}Expand description
Reply to a comment or post
T is how reply_to is given: a ContentTarget in a tool’s input,
which may be a short id, and a full ContentId in the signed payload,
once the short id is resolved (CreateCommentInput,
CreateCommentPayload)
Fields§
§reply_to: TComment or post id
body: StringImplementations§
Source§impl<T> CreateComment<T>
impl<T> CreateComment<T>
Sourcepub fn with_reply_to<U>(self, reply_to: U) -> CreateComment<U>
pub fn with_reply_to<U>(self, reply_to: U) -> CreateComment<U>
The same comment, replying to reply_to (the resolved id)
Trait Implementations§
Source§impl<T: Clone> Clone for CreateComment<T>
impl<T: Clone> Clone for CreateComment<T>
Source§impl<T: Debug> Debug for CreateComment<T>
impl<T: Debug> Debug for CreateComment<T>
Source§impl<'de, T> Deserialize<'de> for CreateComment<T>where
T: ContentField,
impl<'de, T> Deserialize<'de> for CreateComment<T>where
T: ContentField,
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<'a> From<&'a CreateComment<ContentId>> for SignedAction<'a>
impl<'a> From<&'a CreateComment<ContentId>> for SignedAction<'a>
Source§fn from(p: &'a CreateCommentPayload) -> Self
fn from(p: &'a CreateCommentPayload) -> Self
Converts to this type from the input type.
Source§impl<T> Serialize for CreateComment<T>where
T: Serialize,
impl<T> Serialize for CreateComment<T>where
T: Serialize,
Source§impl<T> Validate for CreateComment<T>
impl<T> Validate for CreateComment<T>
Source§fn validate_into(
&self,
__garde_user_ctx: &Self::Context,
__garde_path: &mut dyn FnMut() -> Path,
__garde_report: &mut Report,
)
fn validate_into( &self, __garde_user_ctx: &Self::Context, __garde_path: &mut dyn FnMut() -> Path, __garde_report: &mut Report, )
Validates
Self, aggregating all validation errors into Report.Auto Trait Implementations§
impl<T> Freeze for CreateComment<T>where
T: Freeze,
impl<T> RefUnwindSafe for CreateComment<T>where
T: RefUnwindSafe,
impl<T> Send for CreateComment<T>where
T: Send,
impl<T> Sync for CreateComment<T>where
T: Sync,
impl<T> Unpin for CreateComment<T>where
T: Unpin,
impl<T> UnsafeUnpin for CreateComment<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for CreateComment<T>where
T: UnwindSafe,
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