pub struct UserDraftOverlay {
pub is_draft: bool,
pub draft_saved_at: Option<String>,
pub no_deployed: Option<bool>,
pub draft: Option<HashMap<String, Value>>,
pub other_drafts_users: Option<Vec<UserDraftOverlayOtherDraftsUsersInner>>,
}Expand description
UserDraftOverlay : Overlay fields added to every "get by path" response that accepts the get_draft query parameter. The deployed payload is sent untouched in the response body; the authed user’s saved draft for this path — whatever shape the editor wrote — is attached as the sibling draft field when get_draft=true and a draft exists. The frontend pairs the two to present diff / reset / discard UI; the server never merges them. When no_deployed=true there is no deployed row at this path — the response body is a best-effort stand-in synthesized from the draft, and only draft is canonical. Callers should disable "diff vs deployed" UI in that case.
Fields§
§is_draft: bool§draft_saved_at: Option<String>§no_deployed: Option<bool>§draft: Option<HashMap<String, Value>>§other_drafts_users: Option<Vec<UserDraftOverlayOtherDraftsUsersInner>>Other workspace users (and the legacy NULL-email row, if any) with a saved draft at the same path. Populated only on the authed user’s "get by path" responses for kinds the editor surfaces a fork banner for (script, flow, app, raw_app). Empty / omitted for kinds without that UI.
Implementations§
Source§impl UserDraftOverlay
impl UserDraftOverlay
Sourcepub fn new(is_draft: bool) -> UserDraftOverlay
pub fn new(is_draft: bool) -> UserDraftOverlay
Overlay fields added to every "get by path" response that accepts the get_draft query parameter. The deployed payload is sent untouched in the response body; the authed user’s saved draft for this path — whatever shape the editor wrote — is attached as the sibling draft field when get_draft=true and a draft exists. The frontend pairs the two to present diff / reset / discard UI; the server never merges them. When no_deployed=true there is no deployed row at this path — the response body is a best-effort stand-in synthesized from the draft, and only draft is canonical. Callers should disable "diff vs deployed" UI in that case.
Trait Implementations§
Source§impl Clone for UserDraftOverlay
impl Clone for UserDraftOverlay
Source§fn clone(&self) -> UserDraftOverlay
fn clone(&self) -> UserDraftOverlay
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UserDraftOverlay
impl Debug for UserDraftOverlay
Source§impl Default for UserDraftOverlay
impl Default for UserDraftOverlay
Source§fn default() -> UserDraftOverlay
fn default() -> UserDraftOverlay
Source§impl<'de> Deserialize<'de> for UserDraftOverlay
impl<'de> Deserialize<'de> for UserDraftOverlay
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>,
Source§impl PartialEq for UserDraftOverlay
impl PartialEq for UserDraftOverlay
Source§fn eq(&self, other: &UserDraftOverlay) -> bool
fn eq(&self, other: &UserDraftOverlay) -> bool
self and other values to be equal, and is used by ==.