Skip to main content

UpdatePageRequest

Struct UpdatePageRequest 

Source
pub struct UpdatePageRequest {
    pub content: String,
    pub source_memory_ids: Vec<String>,
    pub expected_version: Option<i64>,
    pub caller_id: Option<String>,
    pub operation_id: Option<String>,
}

Fields§

§content: String§source_memory_ids: Vec<String>

Source memory IDs to associate with this page version. Omitted or empty by HTTP callers that preserve existing sources; always populated by post_write::update_page.

§expected_version: Option<i64>

Optimistic-concurrency guard for the M0 write gate. Some(v) lands the write only while the stored page is still at version v; a mismatch is refused instead of overwriting whatever landed in between.

Omitted by legacy clients, in which case the server guards on the version it loaded to make the ownership decision — so the decision and the write always describe the same row.

§caller_id: Option<String>

Retry identity. Sent together, caller_id and operation_id make the write replayable: the same pair with the same request replays the stored response instead of writing again, and the same pair with a different request is a conflict. This is what turns “the response was lost, the client retried” into a no-op rather than a second version.

Either one alone is ignored — an operation id is only meaningful within the caller that minted it.

§operation_id: Option<String>

Trait Implementations§

Source§

impl Debug for UpdatePageRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for UpdatePageRequest

Source§

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 Serialize for UpdatePageRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.