mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-13 15:46:53 +00:00
docs: various fixes in Rust code documentation
- add backticks on struct doc comments lint message: unclosed HTML tag `M` - add a blanck line for proper doc formating lint message: doc list item without indentation help: if this is supposed to be its own paragraph, add a blank line help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_lazy_continuation - fix hyperlink in doc + one url invalid lint message: this URL is not a hyperlink note: bare URLs are not automatically turned into clickable links - ajust space in doc lint message: doc list item overindented help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_overindented_list_items
This commit is contained in:
+5
-3
@@ -100,9 +100,9 @@ pub trait Message: Serialize + for<'de> Deserialize<'de> + Send + Sync + 'static
|
||||
|
||||
// ----
|
||||
|
||||
/// The Req<M> is a helper object used to create requests and attach them
|
||||
/// The `Req<M>` is a helper object used to create requests and attach them
|
||||
/// a stream of data. If the stream is a fixed Bytes and not a ByteStream,
|
||||
/// Req<M> is cheaply cloneable to allow the request to be sent to different
|
||||
/// `Req<M>` is cheaply cloneable to allow the request to be sent to different
|
||||
/// peers (Clone will panic if the stream is a ByteStream).
|
||||
pub struct Req<M: Message> {
|
||||
pub(crate) msg: Arc<M>,
|
||||
@@ -260,7 +260,7 @@ where
|
||||
|
||||
// ----
|
||||
|
||||
/// The Resp<M> represents a full response from a RPC that may have
|
||||
/// The `Resp<M>` represents a full response from a RPC that may have
|
||||
/// an attached stream.
|
||||
pub struct Resp<M: Message> {
|
||||
pub(crate) _phantom: PhantomData<M>,
|
||||
@@ -458,11 +458,13 @@ impl ReqEnc {
|
||||
}
|
||||
|
||||
/// Encoding for responses into a ByteStream:
|
||||
///
|
||||
/// IF SUCCESS:
|
||||
/// - 0: u8
|
||||
/// - msg len: u32
|
||||
/// - msg [u8; ..]
|
||||
/// - the attached stream as the rest of the encoded stream
|
||||
///
|
||||
/// IF ERROR:
|
||||
/// - message length + 1: u8
|
||||
/// - error code: u8
|
||||
|
||||
Reference in New Issue
Block a user