docs(rdpdr): fix rustdoc warnings

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau
2024-10-29 19:14:20 +09:00
committed by Benoît Cortier
parent a096b14488
commit 3a1aeedb55
3 changed files with 9 additions and 11 deletions
+1 -3
View File
@@ -44,7 +44,7 @@ pub struct Rdpdr {
/// The name of the computer that is running the client.
///
/// Any directories shared will be displayed by File Explorer
/// as "<directory> on <computer_name>".
/// as "`<directory>` on `<computer_name>`".
computer_name: String,
capabilities: Capabilities,
/// Pre-configured list of devices to announce to the server.
@@ -60,8 +60,6 @@ impl Rdpdr {
pub const NAME: ChannelName = ChannelName::from_static(b"rdpdr\0\0\0");
/// Creates a new [`Rdpdr`].
///
/// See [`Rdpdr::computer_name`].
pub fn new(backend: Box<dyn RdpdrBackend>, computer_name: String) -> Self {
Self {
computer_name,
+4 -4
View File
@@ -734,8 +734,8 @@ bitflags! {
///
/// [Server Client ID Confirm (section 2.2.2.6)]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpefs/bbbb9666-6994-4cf6-8e65-0d46eb319c6e
/// [2.2.2.3]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpefs/d6fe6d1b-c145-4a6f-99aa-4fe3cdcea398
const VERSION_MINOR_12: u16 = 0x000C;
const VERSION_MAJOR: u16 = 0x0001;
pub const VERSION_MINOR_12: u16 = 0x000C;
pub const VERSION_MAJOR: u16 = 0x0001;
/// [2.2.2.9] Client Device List Announce Request (DR_CORE_DEVICELIST_ANNOUNCE_REQ)
/// and [2.2.3.1] Client Device List Announce (DR_DEVICELIST_ANNOUNCE)
@@ -2707,7 +2707,7 @@ impl ClientDriveQueryDirectoryResponse {
///
/// We only need to read the buffer up to the FileInformationClass to get the job done, so the rest of the fields in
/// this structure are discarded. See FreeRDP:
/// https://github.com/FreeRDP/FreeRDP/blob/511444a65e7aa2f537c5e531fa68157a50c1bd4d/channels/drive/client/drive_main.c#L464
/// <https://github.com/FreeRDP/FreeRDP/blob/511444a65e7aa2f537c5e531fa68157a50c1bd4d/channels/drive/client/drive_main.c#L464>
///
/// [2.2.3.3.6]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpefs/484e622d-0e2b-423c-8461-7de38878effb
#[derive(Debug, PartialEq, Clone)]
@@ -2756,7 +2756,7 @@ impl ServerDriveQueryVolumeInformationRequest {
/// [2.5] File System Information Classes [MS-FSCC]
///
/// [2.5] https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/ee12042a-9352-46e3-9f67-c094b75fe6c3
/// [2.5] <https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/ee12042a-9352-46e3-9f67-c094b75fe6c3>
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct FileSystemInformationClassLevel(u32);
+4 -4
View File
@@ -94,7 +94,7 @@ impl<T> Pdu<T> {
}
impl<T: HeaderlessDecode> Pdu<T> {
/// Decodes the instance from a buffer stripping it of its [`StreamHeader`] and [`TypeHeader`].
/// Decodes the instance from a buffer stripping it of its headers.
pub fn decode(src: &mut ReadCursor<'_>, charset: Option<CharacterSet>) -> DecodeResult<Pdu<T>> {
// We expect `StreamHeader::decode`, `TypeHeader::decode`, and `T::decode` to each
// call `ensure_size!` to ensure that the buffer is large enough, so we can safely
@@ -146,11 +146,11 @@ pub trait Encode: ironrdp_core::Encode + Send + std::fmt::Debug {}
///
/// Implementers should typically implement this trait instead of [`Encode`].
pub trait HeaderlessEncode: Send + std::fmt::Debug {
/// Encodes the instance into a buffer sans its [`StreamHeader`] and [`TypeHeader`].
/// Encodes the instance into a buffer sans its headers.
fn encode(&self, dst: &mut WriteCursor<'_>) -> EncodeResult<()>;
/// Returns the name associated with this RPCE PDU.
fn name(&self) -> &'static str;
/// Returns the size of the instance sans its [`StreamHeader`] and [`TypeHeader`].
/// Returns the size of the instance sans its headers.
fn size(&self) -> usize;
}
@@ -160,7 +160,7 @@ pub trait HeaderlessEncode: Send + std::fmt::Debug {
/// and then call [`Pdu::decode`] to decode the instance. See [`Pdu`] for more
/// details and an example.
pub trait HeaderlessDecode: Sized {
/// Decodes the instance from a buffer sans its [`StreamHeader`] and [`TypeHeader`].
/// Decodes the instance from a buffer sans its headers.
///
/// `charset` is an optional parameter that can be used to specify the character set
/// when relevant. This is useful for accounting for the "A" vs "W" variants of certain