BREAKING: name() -> info() and removed async_trait
Some checks failed
continuous-integration/drone/push Build encountered an error

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2026-02-05 23:20:56 +01:00
parent f0c90edce9
commit 689bfd1325
11 changed files with 240 additions and 244 deletions

View File

@@ -1,3 +1,4 @@
use notmad::ComponentInfo;
use tokio_util::sync::CancellationToken;
struct NestedErrorComponent {
@@ -5,8 +6,8 @@ struct NestedErrorComponent {
}
impl notmad::Component for NestedErrorComponent {
fn name(&self) -> Option<String> {
Some(self.name.clone())
fn info(&self) -> ComponentInfo {
self.name.clone().into()
}
async fn run(&self, _cancellation: CancellationToken) -> Result<(), notmad::MadError> {
@@ -27,8 +28,8 @@ impl notmad::Component for NestedErrorComponent {
struct AnotherFailingComponent;
impl notmad::Component for AnotherFailingComponent {
fn name(&self) -> Option<String> {
Some("another-component".into())
fn info(&self) -> ComponentInfo {
"another-component".into()
}
async fn run(&self, _cancellation: CancellationToken) -> Result<(), notmad::MadError> {