pub struct SourceContext { /* private fields */ }Expand description
The source a Session operates on, as returned/accepted by the Jules API.
Implementations§
Source§impl SourceContext
impl SourceContext
Sourcepub fn new(source: impl Into<String>) -> Self
pub fn new(source: impl Into<String>) -> Self
Creates a new SourceContext pointing at the given source (e.g. sources/github/owner/repo).
Sourcepub fn with_github_repo_context(self, context: GithubRepoContext) -> Self
pub fn with_github_repo_context(self, context: GithubRepoContext) -> Self
Sets the GitHub repo context (e.g. starting branch).
Sourcepub fn with_environment_variables_enabled(self, enabled: bool) -> Self
pub fn with_environment_variables_enabled(self, enabled: bool) -> Self
Sets whether environment variables are enabled for this source context.
Sourcepub fn github_repo_context(&self) -> Option<&GithubRepoContext>
pub fn github_repo_context(&self) -> Option<&GithubRepoContext>
Returns the GitHub repo context, if configured.
Sourcepub fn environment_variables_enabled(&self) -> Option<bool>
pub fn environment_variables_enabled(&self) -> Option<bool>
Returns whether environment variables are enabled, if configured.
Trait Implementations§
Source§impl Clone for SourceContext
impl Clone for SourceContext
Source§fn clone(&self) -> SourceContext
fn clone(&self) -> SourceContext
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 SourceContext
impl Debug for SourceContext
Source§impl Default for SourceContext
impl Default for SourceContext
Source§fn default() -> SourceContext
fn default() -> SourceContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SourceContext
impl<'de> Deserialize<'de> for SourceContext
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SourceContext
Source§impl PartialEq for SourceContext
impl PartialEq for SourceContext
Source§impl Serialize for SourceContext
impl Serialize for SourceContext
impl StructuralPartialEq for SourceContext
Auto Trait Implementations§
impl Freeze for SourceContext
impl RefUnwindSafe for SourceContext
impl Send for SourceContext
impl Sync for SourceContext
impl Unpin for SourceContext
impl UnsafeUnpin for SourceContext
impl UnwindSafe for SourceContext
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