Expand description
§IronRDP Core
IronRDP common traits and types.
Macros§
- Asserts that the type implements all of the given traits.
- Asserts that the traits support dynamic dispatch.
- Safely casts an integer to a different integer type.
- Safely casts a length to a different integer type.
- Ensures that a buffer has at least the fixed part size of a struct.
- Ensures that a buffer has at least the expected size.
- Finds the name of the function in which this macro is expanded
- Implement
AsAnyfor the given type. - Creates an “invalid field” error with context information.
- Creates a “not enough bytes” error with context information.
- Creates a generic “other” error with optional context and source information.
- Creates an “unexpected message type” error with context information.
- Creates an “unsupported value” error with context information.
- Creates an “unsupported version” error with context information.
Structs§
- Error indicating that there are not enough bytes in the buffer to perform an operation.
- A cursor for reading bytes from a buffer.
- A cursor for writing bytes to a buffer.
Enums§
- Enum representing different kinds of decode errors.
- Represents the different kinds of errors that can occur during encoding operations.
Traits§
- Type information (
TypeId) may be retrieved at runtime for this type. - Trait for types that can be decoded from a byte stream.
- Similar to
Decodebut unconditionally returns an owned type. - PDU that can be encoded into its binary form.
- Used to produce an owned version of a given data.
- Trait for creating “invalid field” errors.
- Trait for creating “not enough bytes” errors.
- Trait for creating generic “other” errors.
- Trait for creating “unexpected message type” errors.
- Trait for creating “unsupported value” errors.
- Trait for creating “unsupported version” errors.
- Trait for adding a source to an error type.
Functions§
- Decodes a value of type
Tfrom a byte slice. - Decodes a value of type
Tfrom aReadCursor. - Decodes an owned value of type
Tfrom a byte slice. - Decodes an owned value of type
Tfrom aReadCursor. - Encodes the given PDU in-place into the provided buffer and returns the number of bytes written.
- Encodes the given PDU in-place using the provided
WriteCursor. - Helper function to create an “invalid field” error.
- Helper function to create an “invalid field” error with a source.
- Gets the name of this PDU.
- Helper function to create a “not enough bytes” error.
- Helper function to create a generic “other” error.
- Helper function to create a generic “other” error with a source.
- Computes the size in bytes for this PDU.
- Helper function to create an “unexpected message type” error.
- Helper function to create an “unsupported value” error.
- Helper function to create an “unsupported version” error.
Type Aliases§
- An error type specifically for encoding operations, wrapping an
DecodeErrorKind. - A result type for decoding operations, which can either succeed with a value of type
Tor fail with anDecodeError. - An error type specifically for encoding operations, wrapping an
EncodeErrorKind. - A result type for encoding operations, which can either succeed with a value of type
Tor fail with anEncodeError.