pub struct CreatePalaceBody {
pub name: String,
pub description: Option<String>,
pub cwd: Option<String>,
}Expand description
POST /api/v1/palaces body — service-facing version.
Why: Change 2 — the optional cwd field lets HTTP callers pass the
filesystem path of the project they are operating from. When present,
validate_palace_name uses it as the start for pin-file-based
validation instead of the daemon’s own cwd (which is ~ or / and
rarely meaningful). When absent the existing daemon-cwd fallback applies
so older clients continue to work.
What: name is required; description and cwd are optional.
Test: create_palace_accepts_pinned_slug_via_cwd,
create_palace_rejects_mismatch_when_cwd_given.
Fields§
§name: String§description: Option<String>§cwd: Option<String>Optional caller working directory used for palace-name enforcement.
When present, validate_palace_name uses this path instead of the
daemon’s process cwd. Useful when the daemon is launched from ~/
but the caller is inside a project tree.
Trait Implementations§
Source§impl Clone for CreatePalaceBody
impl Clone for CreatePalaceBody
Source§fn clone(&self) -> CreatePalaceBody
fn clone(&self) -> CreatePalaceBody
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 CreatePalaceBody
impl Debug for CreatePalaceBody
Source§impl<'de> Deserialize<'de> for CreatePalaceBody
impl<'de> Deserialize<'de> for CreatePalaceBody
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>,
Auto Trait Implementations§
impl Freeze for CreatePalaceBody
impl RefUnwindSafe for CreatePalaceBody
impl Send for CreatePalaceBody
impl Sync for CreatePalaceBody
impl Unpin for CreatePalaceBody
impl UnsafeUnpin for CreatePalaceBody
impl UnwindSafe for CreatePalaceBody
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more