pub struct ServerInfo {Show 13 fields
pub name: Option<String>,
pub software: Option<String>,
pub version: Option<String>,
pub description: Option<String>,
pub buds: Vec<u8>,
pub extensions: Vec<String>,
pub max_blob: Option<u64>,
pub mime: Vec<String>,
pub capacity_used: Option<u64>,
pub capacity_limit: Option<u64>,
pub caller: Option<CallerInfo>,
pub fetched_at: i64,
pub raw: Value,
}Fields§
§name: Option<String>§software: Option<String>§version: Option<String>§description: Option<String>§buds: Vec<u8>§extensions: Vec<String>§max_blob: Option<u64>The largest blob any account may upload.
mime: Vec<String>§capacity_used: Option<u64>§capacity_limit: Option<u64>§caller: Option<CallerInfo>§fetched_at: i64Unix seconds.
raw: ValueThe document as received, for persisting; not sent to the UI.
Implementations§
Source§impl ServerInfo
impl ServerInfo
Sourcepub fn parse(v: &Value) -> Option<Self>
pub fn parse(v: &Value) -> Option<Self>
Read a document. None when the JSON is not an information document
at all (a server that answers the path with something else).
Sourcepub fn is_personalised(&self) -> bool
pub fn is_personalised(&self) -> bool
The document carries limits and a caller block, not just a BUD list.
Sourcepub fn accepts_size(&self, size: u64) -> Option<bool>
pub fn accepts_size(&self, size: u64) -> Option<bool>
Whether this server would take a blob of size from us, as far as the
document says. None when it says nothing about size.
Trait Implementations§
Source§impl Clone for ServerInfo
impl Clone for ServerInfo
Source§impl Debug for ServerInfo
impl Debug for ServerInfo
impl Eq for ServerInfo
Source§impl PartialEq for ServerInfo
impl PartialEq for ServerInfo
Source§impl Serialize for ServerInfo
impl Serialize for ServerInfo
impl StructuralPartialEq for ServerInfo
Auto Trait Implementations§
impl Freeze for ServerInfo
impl RefUnwindSafe for ServerInfo
impl Send for ServerInfo
impl Sync for ServerInfo
impl Unpin for ServerInfo
impl UnsafeUnpin for ServerInfo
impl UnwindSafe for ServerInfo
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§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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more