pub struct ServiceInfo {
pub title: String,
pub version: String,
pub description: Option<String>,
}Expand description
Title, version and optional prose description of a service.
Fields§
§title: StringHuman readable name of the service.
version: StringVersion of the service.
description: Option<String>Prose description, carried by both documents when present.
Implementations§
Source§impl ServiceInfo
impl ServiceInfo
Sourcepub fn new<T: Into<String>, V: Into<String>>(title: T, version: V) -> Self
pub fn new<T: Into<String>, V: Into<String>>(title: T, version: V) -> Self
A service with a title and a version.
Sourcepub fn describing<D: Into<String>>(self, description: D) -> Self
pub fn describing<D: Into<String>>(self, description: D) -> Self
The same service carrying a prose description.
§Examples
use lino_rest_api::description::ServiceInfo;
let info = ServiceInfo::new("Tasks API", "1.0.0").describing("A task list");
assert_eq!(info.description.as_deref(), Some("A task list"));Trait Implementations§
Source§impl Clone for ServiceInfo
impl Clone for ServiceInfo
Source§impl Debug for ServiceInfo
impl Debug for ServiceInfo
Source§impl Default for ServiceInfo
impl Default for ServiceInfo
impl Eq for ServiceInfo
Source§impl PartialEq for ServiceInfo
impl PartialEq for ServiceInfo
impl StructuralPartialEq for ServiceInfo
Auto Trait Implementations§
impl Freeze for ServiceInfo
impl RefUnwindSafe for ServiceInfo
impl Send for ServiceInfo
impl Sync for ServiceInfo
impl Unpin for ServiceInfo
impl UnsafeUnpin for ServiceInfo
impl UnwindSafe for ServiceInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.