pub struct LocalProfile {
pub data_dir: PathBuf,
pub workspace_root: PathBuf,
pub base_url: String,
pub org_public_id: String,
pub owner_principal_id: PrincipalId,
}Expand description
Local environment configuration.
Fields§
§data_dir: PathBufDirectory holding the local SQLite database(s).
workspace_root: PathBufRoot directory for the session workspace filesystem.
base_url: StringBase URL used to build UI links in tool results.
org_public_id: StringPublic organization id for created records.
owner_principal_id: PrincipalIdOwning principal stamped on schedules/sessions created locally.
Implementations§
Source§impl LocalProfile
impl LocalProfile
Sourcepub fn new(data_dir: impl Into<PathBuf>) -> Self
pub fn new(data_dir: impl Into<PathBuf>) -> Self
Start from defaults rooted at data_dir. The workspace defaults to
data_dir/workspace.
pub fn with_workspace_root(self, root: impl Into<PathBuf>) -> Self
pub fn with_base_url(self, base_url: impl Into<String>) -> Self
pub fn with_org_public_id(self, org_public_id: impl Into<String>) -> Self
pub fn with_owner_principal_id(self, owner_principal_id: PrincipalId) -> Self
Sourcepub fn ensure_dirs(&self) -> Result<()>
pub fn ensure_dirs(&self) -> Result<()>
Ensure data_dir and workspace_root exist on disk.
pub fn data_dir(&self) -> &Path
Trait Implementations§
Source§impl Clone for LocalProfile
impl Clone for LocalProfile
Source§fn clone(&self) -> LocalProfile
fn clone(&self) -> LocalProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LocalProfile
impl Debug for LocalProfile
Auto Trait Implementations§
impl Freeze for LocalProfile
impl RefUnwindSafe for LocalProfile
impl Send for LocalProfile
impl Sync for LocalProfile
impl Unpin for LocalProfile
impl UnsafeUnpin for LocalProfile
impl UnwindSafe for LocalProfile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request