pub struct Notification {
pub id: Option<i32>,
pub url: Option<String>,
pub display: Option<String>,
pub object_type: String,
pub object_id: i64,
pub object: Option<Option<Value>>,
pub user: Box<BriefUser>,
pub created: Option<String>,
pub read: Option<Option<String>>,
pub event_type: EventType,
}Expand description
Notification : Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
Fields§
§id: Option<i32>§url: Option<String>§display: Option<String>§object_type: String§object_id: i64§object: Option<Option<Value>>§user: Box<BriefUser>§created: Option<String>§read: Option<Option<String>>§event_type: EventTypeobject_created- Object created *object_updated- Object updated *object_deleted- Object deleted *job_started- Job started *job_completed- Job completed *job_failed- Job failed *job_errored- Job errored *branch_provisioned- Branch provisioned *branch_deprovisioned- Branch deprovisioned *branch_synced- Branch synced *branch_merged- Branch merged *branch_reverted- Branch reverted
Implementations§
Source§impl Notification
impl Notification
Sourcepub fn new(
object_type: String,
object_id: i64,
user: BriefUser,
event_type: EventType,
) -> Notification
pub fn new( object_type: String, object_id: i64, user: BriefUser, event_type: EventType, ) -> Notification
Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
Returns a duplicate 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 Notification
impl Debug for Notification
Source§impl Default for Notification
impl Default for Notification
Source§fn default() -> Notification
fn default() -> Notification
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Notification
impl<'de> Deserialize<'de> for Notification
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 PartialEq for Notification
impl PartialEq for Notification
Source§impl Serialize for Notification
impl Serialize for Notification
impl StructuralPartialEq for Notification
Auto Trait Implementations§
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnwindSafe for Notification
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