pub struct Fallback<T, U> {
pub first: T,
pub second: U,
}Expand description
A wrapper that tries the first operation, and if it fails, tries the second.
Fields§
§first: T§second: UImplementations§
Trait Implementations§
Source§impl<T, U> Concatenator for Fallback<T, U>where
T: Concatenator,
U: Concatenator,
Available on crate features alloc and concatenation only.
impl<T, U> Concatenator for Fallback<T, U>where
T: Concatenator,
U: Concatenator,
Available on crate features
alloc and concatenation only.Source§type Error = FallbackError<<T as Concatenator>::Error, <U as Concatenator>::Error>
type Error = FallbackError<<T as Concatenator>::Error, <U as Concatenator>::Error>
The type of errors that can occur during concatenation.
Source§fn concatenate(
&self,
message: &str,
max_message_size: usize,
part_header_size: usize,
) -> Result<(Concatenation, DataCoding), Self::Error>
fn concatenate( &self, message: &str, max_message_size: usize, part_header_size: usize, ) -> Result<(Concatenation, DataCoding), Self::Error>
Splits the encoded message into concatenated parts and their associated
DataCoding. Read more