pub struct LogsResource<'a> { /* private fields */ }Expand description
client.logs()
Implementations§
Source§impl<'a> LogsResource<'a>
impl<'a> LogsResource<'a>
pub fn statistics(&self) -> LogsStatisticsResource<'a>
Sourcepub fn get(&self, id: impl Display) -> Result<Log>
pub fn get(&self, id: impl Display) -> Result<Log>
Get a log message
GET /logs/{id}
Fetch one specific log message by its ID.
§Example
let log = client.logs().get(1)?;
println!("{}", log.id);Sourcepub fn list(&self) -> Result<Vec<Log>>
pub fn list(&self) -> Result<Vec<Log>>
Get all log messages
GET /logs
The response is a collection of all log messages you may see and is limited to a specific number of messages. You can use the page parameter to browse the list of log messages. The logs are ordered by date.
Use Self::list_with to pass query parameters.
§Example
for log in client.logs().list()? {
println!("{}", log.id);
}Sourcepub fn list_with(&self, query: &GetLogsQuery) -> Result<Vec<Log>>
pub fn list_with(&self, query: &GetLogsQuery) -> Result<Vec<Log>>
Get all log messages
Like Self::list, with query parameters.
GET /logs
The response is a collection of all log messages you may see and is limited to a specific number of messages. You can use the page parameter to browse the list of log messages. The logs are ordered by date.
Sourcepub fn list_iter(&self, query: &GetLogsQuery) -> Items<Log> ⓘ
pub fn list_iter(&self, query: &GetLogsQuery) -> Items<Log> ⓘ
Get all log messages
Like Self::list_with, but lazy: each page is fetched only when the iteration reaches it.
Breaking off early saves the remaining requests.