mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-08-04 15:18:17 +00:00
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:
parent
c49f190d29
commit
23bc008d65
155 changed files with 1283 additions and 651 deletions
|
@ -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)"
|
||||
)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue