feat: improve doc titles

This commit is contained in:
Lucas Colombo 2024-06-06 12:31:32 -03:00
parent dbd234c78a
commit e1b9286430
Signed by: lucas
GPG Key ID: EF34786CFEFFAE35
5 changed files with 17 additions and 15 deletions

View File

@ -30,7 +30,7 @@ pub trait BusMessage:
{
}
/// 🐎 » trait for bus **Publisher**s
/// 🐎 » trait for bus `Publisher`s
#[async_trait]
pub trait PublisherTrait<RM: BusMessage> {
/// 🐎 » publish a message to the bus
@ -40,7 +40,7 @@ pub trait PublisherTrait<RM: BusMessage> {
/// 🐎 » trait for bus **Publisher**s
#[async_trait]
pub trait SubscriberTrait<RM: BusMessage> {
/// 🐎 » **stream**
/// 🐎 » stream
///
/// returns an `Observable` stream of messages from the redis bus
async fn stream(&mut self) -> Result<Pin<Box<dyn Stream<Item = RM> + Send + 'static>>>;

View File

@ -485,7 +485,7 @@ macro_rules! rustler_accessors {
};
}
/// **🐎 » rustler builder macro**
/// #### 🐎 » rustler builder macro
///
/// The `rustler!` macro is used to define a new `Rustler` struct, expanding the struct definition
/// with the required fields and derives, and implementing the `RustlerAccessor` trait for the

View File

@ -5,7 +5,7 @@ use {
tokio::sync::Mutex,
};
/// **🐎 » rustlerjar! macro**
/// #### 🐎 » rustlerjar! macro
///
/// A macro to create a `RustlerJar` with multiple Rustler instances and their corresponding
/// mappings.
@ -38,7 +38,7 @@ macro_rules! rustlerjar {
}};
}
/// **🐎 » RustlerJar**
/// #### 🐎 » RustlerJar
///
/// A `RustlerJar` is a collection of Rustlers and their corresponding mappings to the markets.
/// Which indicates which Rustler should be used for a given market. Rustlers are stored as

View File

@ -22,12 +22,12 @@ use {
tokio::sync::{mpsc::Sender, Mutex},
};
/// **🐎 » Rustler Message**
/// #### 🐎 » Rustler Message
pub enum RustlerMsg {
QuoteMsg(Quote),
}
/// **🐎 » create a quote message**
/// #### 🐎 » create a quote message
#[inline]
pub fn quote(
id: String,
@ -47,9 +47,9 @@ pub fn quote(
})
}
/// **🐎 » Rustlers Service**
/// #### 🐎 » Rustlers Service
///
/// The `RustlersSvc` is a service that manages the rustlers and orchestrates their executions.
/// `RustlersSvc` is a service that manages the rustlers and orchestrates their executions.
pub struct RustlersSvc<P>
where
P: PublisherTrait<Quote> + Send + Sync + 'static + Clone,
@ -64,7 +64,7 @@ impl<Publisher> RustlersSvc<Publisher>
where
Publisher: PublisherTrait<Quote> + Send + Sync + 'static + Clone,
{
/// **🐎 » create service**
/// #### 🐎 » create service
///
/// creates a new instance of the `RustlersSvc`
///
@ -86,7 +86,7 @@ where
}
}
/// **🐎 » start rustlers**
/// #### 🐎 » start rustlers
///
/// gets market data from the the database and starts
/// the corresponding rustler for each market
@ -116,7 +116,7 @@ where
}
}
/// **🐎 » restart rustlers**
/// #### 🐎 » restart rustlers
///
/// stops all rustlers and then starts them again
pub async fn restart(&self) -> Result<()> {

View File

@ -38,7 +38,7 @@ pub trait EventDispatcher: Send {
) -> Result<()>;
}
/// 🐎 » **`socket::Server`**
/// 🐎 » Socket Server
/// --
///
/// A websocket gateway server that listens for incoming connections and dispatches events to the
@ -73,13 +73,15 @@ where
})
}
/// **🐎 » `start_no_cb`**: start the server
/// #### 🐎 » start without setting a callback
///
/// will use a _noop_ callback that will do nothing.
pub async fn start_no_cb(&mut self) {
let noop_cb = |_: &Request, response: Response| Ok(response);
self.start(noop_cb).await;
}
/// **🐎 » `start`**
/// #### 🐎 » start the server
///
/// Starts the server with a handshake callback. Usefull for customizing the
/// handshake process, e.g. checking headers, etc.