pub enum Ucs2ConcatenateError {
Encode(Ucs2EncodeError),
PartCapacityExceeded,
InvalidBoundary,
PartsCountExceeded {
max: usize,
actual: usize,
},
}Available on crate feature
encoding only.Expand description
Errors that can occur during UCS2 concatenation.
Variants§
Encode(Ucs2EncodeError)
Encoding error.
PartCapacityExceeded
Part cannot fit even a single character.
This error is returned when max_message_size - part_header_size == 0.
InvalidBoundary
A part would end with a leading surrogate, which is not allowed unless allow_split_character=true.
This error might be returned when max_message_size - part_header_size < 2 && allow_split_character == false.
PartsCountExceeded
The number of parts exceeds the maximum allowed.
Trait Implementations§
Source§impl Debug for Ucs2ConcatenateError
impl Debug for Ucs2ConcatenateError
Source§impl Display for Ucs2ConcatenateError
impl Display for Ucs2ConcatenateError
Source§impl Error for Ucs2ConcatenateError
impl Error for Ucs2ConcatenateError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Ucs2EncodeError> for Ucs2ConcatenateError
impl From<Ucs2EncodeError> for Ucs2ConcatenateError
Source§fn from(source: Ucs2EncodeError) -> Self
fn from(source: Ucs2EncodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Ucs2ConcatenateError
impl PartialEq for Ucs2ConcatenateError
impl Eq for Ucs2ConcatenateError
impl StructuralPartialEq for Ucs2ConcatenateError
Auto Trait Implementations§
impl Freeze for Ucs2ConcatenateError
impl RefUnwindSafe for Ucs2ConcatenateError
impl Send for Ucs2ConcatenateError
impl Sync for Ucs2ConcatenateError
impl Unpin for Ucs2ConcatenateError
impl UnwindSafe for Ucs2ConcatenateError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more