pub struct Server {Show 15 fields
pub _id: String,
pub owner: String,
pub name: String,
pub description: Option<String>,
pub channels: Vec<String, Global>,
pub categories: Option<Vec<Category, Global>>,
pub system_messages: Option<Box<ServerSystemMessages, Global>>,
pub roles: Option<HashMap<String, Role, RandomState>>,
pub default_permissions: i64,
pub icon: Option<Box<ServerIcon, Global>>,
pub banner: Option<Box<ServerBanner, Global>>,
pub flags: Option<i32>,
pub nsfw: Option<bool>,
pub analytics: Option<bool>,
pub discoverable: Option<bool>,
}Expand description
Server : Representation of a server on Revolt
Fields
_id: StringUnique Id
owner: StringUser id of the owner
name: StringName of the server
description: Option<String>Description for the server
channels: Vec<String, Global>Channels within this server
categories: Option<Vec<Category, Global>>Categories for this server
system_messages: Option<Box<ServerSystemMessages, Global>>roles: Option<HashMap<String, Role, RandomState>>Roles for this server
default_permissions: i64Default set of server and channel permissions
icon: Option<Box<ServerIcon, Global>>flags: Option<i32>Enum of server flags
nsfw: Option<bool>Whether this server is flagged as not safe for work
analytics: Option<bool>Whether to enable analytics
discoverable: Option<bool>Whether this server should be publicly discoverable
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Server
impl<'de> Deserialize<'de> for Server
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Server, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Server, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<Server> for Server
impl PartialEq<Server> for Server
sourceimpl Serialize for Server
impl Serialize for Server
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Server
Auto Trait Implementations
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more