feat: Add is_internal method to MetaPlugin trait and implementations
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -41,6 +41,10 @@ pub trait MetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn is_internal(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>>;
|
||||
fn finalize(&mut self) -> io::Result<String>;
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@ impl MetaPlugin for MetaPluginProgram {
|
||||
self.supported
|
||||
}
|
||||
|
||||
fn is_internal(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
debug!("META: Writing using {:?}", *self);
|
||||
|
||||
|
||||
@@ -248,6 +248,10 @@ impl BinaryMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for BinaryMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
@@ -280,6 +284,10 @@ impl CwdMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for CwdMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
@@ -314,6 +322,10 @@ impl UidMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for UidMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
@@ -345,6 +357,10 @@ impl UserMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for UserMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
@@ -379,6 +395,10 @@ impl GidMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for GidMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
@@ -410,6 +430,10 @@ impl GroupMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for GroupMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
@@ -444,6 +468,10 @@ impl ShellMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for ShellMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
@@ -478,6 +506,10 @@ impl ShellPidMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for ShellPidMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
@@ -512,6 +544,10 @@ impl KeepPidMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for KeepPidMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
@@ -543,6 +579,10 @@ impl HostnameMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for HostnameMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
@@ -577,6 +617,10 @@ impl FullHostnameMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for FullHostnameMetaPlugin {
|
||||
fn is_internal(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<Box<dyn Write>> {
|
||||
Ok(Box::new(io::sink()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user