pub struct EnvironmentUtils;Expand description
Common environment utilities for workspaces
Implementations§
Source§impl EnvironmentUtils
impl EnvironmentUtils
Sourcepub fn get_platform() -> &'static str
pub fn get_platform() -> &'static str
Get the current platform string
Sourcepub fn get_current_date() -> String
pub fn get_current_date() -> String
Get the current date in YYYY-MM-DD format
Sourcepub fn is_git_repo(path: &Path) -> bool
pub fn is_git_repo(path: &Path) -> bool
Check if a directory is a git repository
Sourcepub fn read_readme(path: &Path) -> Option<String>
pub fn read_readme(path: &Path) -> Option<String>
Read README.md if it exists
Sourcepub fn read_memory_file(path: &Path) -> Option<(String, String)>
pub fn read_memory_file(path: &Path) -> Option<(String, String)>
Read AGENTS.md if it exists, otherwise fall back to CLAUDE.md.
Sourcepub fn read_claude_md(path: &Path) -> Option<String>
pub fn read_claude_md(path: &Path) -> Option<String>
Read AGENTS.md (preferred) or CLAUDE.md and return only the content.
Auto Trait Implementations§
impl Freeze for EnvironmentUtils
impl RefUnwindSafe for EnvironmentUtils
impl Send for EnvironmentUtils
impl Sync for EnvironmentUtils
impl Unpin for EnvironmentUtils
impl UnwindSafe for EnvironmentUtils
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
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>
Converts
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>
Converts
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 moreSource§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