Expand description
§IronRDP Core
IronRDP common traits and types.
Macros§
- assert_impl 
- Asserts that the type implements all of the given traits.
- assert_obj_ safe 
- Asserts that the traits support dynamic dispatch.
- cast_int 
- Safely casts an integer to a different integer type.
- cast_length 
- Safely casts a length to a different integer type.
- ensure_fixed_ part_ size 
- Ensures that a buffer has at least the fixed part size of a struct.
- ensure_size 
- Ensures that a buffer has at least the expected size.
- function
- Finds the name of the function in which this macro is expanded
- impl_as_ any 
- Implement AsAnyfor the given type.
- invalid_field_ err 
- Creates an “invalid field” error with context information.
- not_enough_ bytes_ err 
- Creates a “not enough bytes” error with context information.
- other_err 
- Creates a generic “other” error with optional context and source information.
- unexpected_message_ type_ err 
- Creates an “unexpected message type” error with context information.
- unsupported_value_ err 
- Creates an “unsupported value” error with context information.
- unsupported_version_ err 
- Creates an “unsupported version” error with context information.
Structs§
- NotEnoughBytes Error 
- Error indicating that there are not enough bytes in the buffer to perform an operation.
- ReadCursor 
- A cursor for reading bytes from a buffer.
- WriteCursor 
- A cursor for writing bytes to a buffer.
Enums§
- DecodeError Kind 
- Enum representing different kinds of decode errors.
- EncodeError Kind 
- Represents the different kinds of errors that can occur during encoding operations.
Traits§
- AsAny
- Type information (TypeId) may be retrieved at runtime for this type.
- Decode
- Trait for types that can be decoded from a byte stream.
- DecodeOwned 
- Similar to Decodebut unconditionally returns an owned type.
- Encode
- PDU that can be encoded into its binary form.
- IntoOwned 
- Used to produce an owned version of a given data.
- InvalidField Err 
- Trait for creating “invalid field” errors.
- NotEnoughBytes Err 
- Trait for creating “not enough bytes” errors.
- OtherErr 
- Trait for creating generic “other” errors.
- UnexpectedMessage Type Err 
- Trait for creating “unexpected message type” errors.
- UnsupportedValue Err 
- Trait for creating “unsupported value” errors.
- UnsupportedVersion Err 
- Trait for creating “unsupported version” errors.
- WithSource 
- Trait for adding a source to an error type.
Functions§
- decode
- Decodes a value of type Tfrom a byte slice.
- decode_cursor 
- Decodes a value of type Tfrom aReadCursor.
- decode_owned 
- Decodes an owned value of type Tfrom a byte slice.
- decode_owned_ cursor 
- Decodes an owned value of type Tfrom aReadCursor.
- encode
- Encodes the given PDU in-place into the provided buffer and returns the number of bytes written.
- encode_cursor 
- Encodes the given PDU in-place using the provided WriteCursor.
- invalid_field_ err 
- Helper function to create an “invalid field” error.
- invalid_field_ err_ with_ source 
- Helper function to create an “invalid field” error with a source.
- name
- Gets the name of this PDU.
- not_enough_ bytes_ err 
- Helper function to create a “not enough bytes” error.
- other_err 
- Helper function to create a generic “other” error.
- other_err_ with_ source 
- Helper function to create a generic “other” error with a source.
- size
- Computes the size in bytes for this PDU.
- unexpected_message_ type_ err 
- Helper function to create an “unexpected message type” error.
- unsupported_value_ err 
- Helper function to create an “unsupported value” error.
- unsupported_version_ err 
- Helper function to create an “unsupported version” error.
Type Aliases§
- DecodeError 
- An error type specifically for encoding operations, wrapping an DecodeErrorKind.
- DecodeResult 
- A result type for decoding operations, which can either succeed with a value of type Tor fail with anDecodeError.
- EncodeError 
- An error type specifically for encoding operations, wrapping an EncodeErrorKind.
- EncodeResult 
- A result type for encoding operations, which can either succeed with a value of type Tor fail with anEncodeError.