refactor(core): move {Decode/Encode}Error

& document the public API.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2024-08-22 14:46:24 +04:00 committed by Benoît Cortier
parent c49f190d29
commit 23bc008d65
155 changed files with 1283 additions and 651 deletions

View file

@ -894,11 +894,11 @@ where
const RDCLEANPATH_HINT: RDCleanPathHint = RDCleanPathHint;
impl ironrdp::pdu::PduHint for RDCleanPathHint {
fn find_size(&self, bytes: &[u8]) -> ironrdp::pdu::DecodeResult<Option<(bool, usize)>> {
fn find_size(&self, bytes: &[u8]) -> ironrdp::core::DecodeResult<Option<(bool, usize)>> {
match ironrdp_rdcleanpath::RDCleanPathPdu::detect(bytes) {
ironrdp_rdcleanpath::DetectionResult::Detected { total_length, .. } => Ok(Some((true, total_length))),
ironrdp_rdcleanpath::DetectionResult::NotEnoughBytes => Ok(None),
ironrdp_rdcleanpath::DetectionResult::Failed => Err(ironrdp::pdu::other_err!(
ironrdp_rdcleanpath::DetectionResult::Failed => Err(ironrdp::core::other_err!(
"RDCleanPathHint",
"detection failed (invalid PDU)"
)),