pub struct CommandOverride {
pub key: String,
pub file_path: Option<PathBuf>,
pub function_name: Option<String>,
pub line_range: Option<(usize, usize)>,
pub env: IndexMap<String, String>,
pub cargo_options: Vec<String>,
pub rustc_options: Vec<String>,
pub args: Vec<String>,
pub mode: OverrideMode,
pub created_at: DateTime<Utc>,
pub description: Option<String>,
}
Fields§
§key: String
§file_path: Option<PathBuf>
§function_name: Option<String>
§line_range: Option<(usize, usize)>
§env: IndexMap<String, String>
§cargo_options: Vec<String>
§rustc_options: Vec<String>
§args: Vec<String>
§mode: OverrideMode
§created_at: DateTime<Utc>
§description: Option<String>
Implementations§
Source§impl CommandOverride
impl CommandOverride
pub fn new(key: String) -> CommandOverride
pub fn with_file(self, path: PathBuf) -> CommandOverride
pub fn with_function(self, name: String) -> CommandOverride
pub fn with_line_range(self, start: usize, end: usize) -> CommandOverride
pub fn with_env(self, key: String, value: String) -> CommandOverride
pub fn with_cargo_option(self, option: String) -> CommandOverride
pub fn with_rustc_option(self, option: String) -> CommandOverride
pub fn with_arg(self, arg: String) -> CommandOverride
pub fn with_mode(self, mode: OverrideMode) -> CommandOverride
pub fn with_description(self, desc: String) -> CommandOverride
pub fn generate_key(&self) -> String
pub fn matches_context( &self, file: Option<&PathBuf>, function: Option<&str>, line: Option<usize>, ) -> bool
Trait Implementations§
Source§impl Clone for CommandOverride
impl Clone for CommandOverride
Source§fn clone(&self) -> CommandOverride
fn clone(&self) -> CommandOverride
Returns a duplicate of the value. Read more
1.0.0 · 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 CommandOverride
impl Debug for CommandOverride
Source§impl<'de> Deserialize<'de> for CommandOverride
impl<'de> Deserialize<'de> for CommandOverride
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CommandOverride, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CommandOverride, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CommandOverride
impl Serialize for CommandOverride
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CommandOverride
impl RefUnwindSafe for CommandOverride
impl Send for CommandOverride
impl Sync for CommandOverride
impl Unpin for CommandOverride
impl UnwindSafe for CommandOverride
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