pub struct NodeInfo {
pub software: Software,
pub protocols: Vec<String>,
pub inbound_services: Vec<String>,
pub outbound_services: Vec<String>,
pub open_registrations: bool,
pub usage: Usage,
pub metadata: Value,
}Expand description
A server’s NodeInfo, in the 2.1 schema; 2.0 is served from it without what 2.0 lacks.
Fields§
§software: Software§protocols: Vec<String>activitypub unless the server speaks more.
inbound_services: Vec<String>§outbound_services: Vec<String>§open_registrations: bool§usage: Usage§metadata: ValueFree-form, such as nodeName and nodeDescription.
Implementations§
Source§impl NodeInfo
impl NodeInfo
Sourcepub fn new(software: Software) -> Self
pub fn new(software: Software) -> Self
A NodeInfo for software, speaking ActivityPub, closed to
registrations, with nothing else said.
Sourcepub fn from_document(document: &Value) -> Option<Self>
pub fn from_document(document: &Value) -> Option<Self>
Read another server’s NodeInfo document, in any 2.x schema, or 1.x
as far as it says the same: leniently, as servers write it, keeping
what is there and leaving out what is not. None when it names no
software.
Trait Implementations§
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
Mutably borrows from an owned value. Read more