Skip to main content

Request

Enum Request 

Source
pub enum Request {
Show 21 variants TemplateInit(TemplateInitArgs), TemplateRefresh { name: String, path: Option<String>, layered: bool, }, TemplateSet(TemplateSetArgs), TemplateList, TemplateHistory { name: String, }, TemplateRollback { name: String, to: Option<u32>, }, TemplateUpgrade { name: String, to: u32, as_name: Option<String>, }, CloneCreate(CloneCreateArgs), CloneList, CloneDestroy { id_or_name: String, force: bool, forget: bool, }, ClonePromote { id_or_name: String, template: Option<String>, }, CloneWake { id_or_name: String, }, CloneDiff { id_or_name: String, table: Option<String>, limit: Option<u32>, parent_pid: Option<i32>, }, PendingRestores, PendingRestoreDone { id: i64, }, Gc, Status, Usage, ConfigReload, Events { filter: EventFilter, follow: bool, }, Shutdown,
}

Variants§

§

TemplateInit(TemplateInitArgs)

§

TemplateRefresh

Fields

§name: String
§path: Option<String>

The refreshing caller’s PATH; for a seed template it replaces the recorded one.

§layered: bool

Copy the current generation and run only the migrate command on it.

§

TemplateSet(TemplateSetArgs)

§

TemplateList

§

TemplateHistory

Fields

§name: String
§

TemplateRollback

Points the template at generation to, or the newest one older than the current.

Fields

§name: String
§

TemplateUpgrade

Moves the template to Postgres to with pg_upgrade: a new generation, or with as_name a new template (same database and settings, schedule off).

Fields

§name: String
§to: u32
§as_name: Option<String>
§

CloneCreate(CloneCreateArgs)

§

CloneList

§

CloneDestroy

Fields

§id_or_name: String
§force: bool

Needed to destroy a protected clone.

§forget: bool

Also drop the name’s reserved port and password.

§

ClonePromote

Makes a running clone the newest generation of its template, or of template.

Fields

§id_or_name: String
§template: Option<String>
§

CloneWake

Starts a sleeping clone (a no-op for a running one); answered with Response::Clone.

Fields

§id_or_name: String
§

CloneDiff

What a clone changed against the template generation it came from; answered with Response::Diff. A parent_pid limits it to a clone of that MCP session.

Fields

§id_or_name: String
§table: Option<String>

A table (name or schema.name) to compare row by row.

§limit: Option<u32>

Rows shown per kind with table; default 20.

§parent_pid: Option<i32>
§

PendingRestores

.env restores the daemon could not finish.

§

PendingRestoreDone

Fields

§id: i64
§

Gc

§

Status

§

Usage

Resource use of all clones against the limits.

§

ConfigReload

Re-read config.toml and the environment; later requests use the new settings.

§

Events

Past events matching filter, oldest first. With follow the daemon keeps the connection open after that list and writes one Response::Event line per new event.

Fields

§follow: bool
§

Shutdown

Trait Implementations§

Source§

impl Clone for Request

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Request

Source§

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

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

impl<'de> Deserialize<'de> for Request

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 Request

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more