pub struct Discovery {
pub protocol: Protocol,
pub server: ServerInfo,
pub min_client: String,
pub auth: Auth,
pub capabilities: BTreeMap<String, Value>,
}Expand description
The discovery document.
Fields§
§protocol: ProtocolThe protocol versions the server speaks.
server: ServerInfoWhich build of the server this is.
min_client: StringThe oldest client version the server accepts, as SemVer.
auth: AuthHow clients may authenticate.
capabilities: BTreeMap<String, Value>What the server can do, by name. An absent name is unsupported.
Implementations§
Source§impl Discovery
impl Discovery
Sourcepub fn accepts(&self, name: &str) -> bool
pub fn accepts(&self, name: &str) -> bool
Whether the server accepts the authentication method name, such
as AUTH_DEVICE_SIG.
Sourcepub fn devices(&self) -> Option<DevicesCapability>
pub fn devices(&self) -> Option<DevicesCapability>
The CAPABILITY_DEVICES capability, read into its type. None
when the server does not list it, and also when it lists one this
build cannot read, which is the same answer: a client cannot use it.
Sourcepub fn audit(&self) -> Option<AuditCapability>
pub fn audit(&self) -> Option<AuditCapability>
The CAPABILITY_AUDIT capability, read into its type: None
from a server that keeps no audit log (one older than 0.4.2), or
lists one this build cannot read.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Discovery
impl<'de> Deserialize<'de> for Discovery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Discovery
Auto Trait Implementations§
impl Freeze for Discovery
impl RefUnwindSafe for Discovery
impl Send for Discovery
impl Sync for Discovery
impl Unpin for Discovery
impl UnsafeUnpin for Discovery
impl UnwindSafe for Discovery
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