From 9110ff85313ea9bf5ee93f60122ce5660accede2 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sun, 22 Feb 2026 15:19:49 +0100 Subject: NetworkMap error handling --- src/message/signalproxy/translation.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/message/signalproxy/translation.rs') diff --git a/src/message/signalproxy/translation.rs b/src/message/signalproxy/translation.rs index 7121032..40ebac1 100644 --- a/src/message/signalproxy/translation.rs +++ b/src/message/signalproxy/translation.rs @@ -93,7 +93,7 @@ //! ``` use crate::{ primitive::{Variant, VariantList}, - ProtocolError, + ProtocolError, Result, }; #[deprecated( @@ -109,18 +109,20 @@ pub trait Network { pub trait NetworkMap where - Self::Item: TryFrom, + Self::Item: TryFrom, Self::Item: Into, { type Item; - fn to_network_map(&self) -> Self::Item; - fn from_network_map(input: &mut Self::Item) -> Self; + fn to_network_map(&self) -> Result; + fn from_network_map(input: &mut Self::Item) -> Result + where + Self: std::marker::Sized; } pub trait NetworkList { - fn to_network_list(&self) -> Result; - fn from_network_list(input: &mut VariantList) -> Result + fn to_network_list(&self) -> Result; + fn from_network_list(input: &mut VariantList) -> Result where Self: std::marker::Sized; } -- cgit v1.2.3