#[non_exhaustive]pub struct NodeInfo {
pub version: Version,
pub software: Software,
pub protocols: Vec<Protocol>,
pub services: Services,
pub open_registrations: bool,
pub usage: Usage,
pub metadata: Value,
}Expand description
A NodeInfo 2.0 / 2.1 document.
All seven top-level fields required by the NodeInfo 2.1 schema are
always present on the wire — empty arrays and empty metadata objects
are emitted rather than omitted, to keep the document strictly
conformant under both 2.0 and 2.1.
Fields that are specific to 2.1 (e.g. Software::repository) remain
Option-typed and are omitted when unset, so a document built with
Version::V2_0 still validates under the 2.0 schema.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.version: VersionSchema version this document conforms to.
software: SoftwareSoftware metadata.
protocols: Vec<Protocol>Federation protocols implemented by this server.
services: ServicesBridge services (always emitted, even when both arrays are empty).
open_registrations: boolWhether the server accepts new registrations.
usage: UsageAggregate usage statistics.
metadata: ValueArbitrary software-specific metadata (always emitted, defaulting to an empty object per the schema).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeInfo
impl<'de> Deserialize<'de> for NodeInfo
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>,
impl Eq for NodeInfo
impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
impl Freeze for NodeInfo
impl RefUnwindSafe for NodeInfo
impl Send for NodeInfo
impl Sync for NodeInfo
impl Unpin for NodeInfo
impl UnsafeUnpin for NodeInfo
impl UnwindSafe for NodeInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.