pub struct ServerLibraryForRead {
pub id: String,
pub name: String,
pub source: Option<String>,
pub root: Option<String>,
pub kind: LibraryType,
pub crypt: Option<bool>,
pub settings: Option<ServerLibrarySettings>,
pub roles: Option<Vec<LibraryRole>>,
pub password_protected: bool,
pub hidden: bool,
}Expand description
A library as a user sees it: what GET /libraries returns, and the library event
carries. Without the credentials and the password.
Fields§
§id: String§name: String§source: Option<String>§root: Option<String>§kind: LibraryType§crypt: Option<bool>§settings: Option<ServerLibrarySettings>§roles: Option<Vec<LibraryRole>>§password_protected: boolImplementations§
Source§impl ServerLibraryForRead
impl ServerLibraryForRead
Sourcepub fn with_roles(
lib: ServerLibrary,
roles: &[LibraryRole],
) -> ServerLibraryForRead
pub fn with_roles( lib: ServerLibrary, roles: &[LibraryRole], ) -> ServerLibraryForRead
The library as seen by a user with these roles.
pub fn is_virtual(&self) -> bool
Sourcepub fn is_crypted(&self) -> bool
pub fn is_crypted(&self) -> bool
Whether its files are encrypted.
Trait Implementations§
Source§impl Clone for ServerLibraryForRead
impl Clone for ServerLibraryForRead
Source§fn clone(&self) -> ServerLibraryForRead
fn clone(&self) -> ServerLibraryForRead
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerLibraryForRead
impl Debug for ServerLibraryForRead
Source§impl Default for ServerLibraryForRead
impl Default for ServerLibraryForRead
Source§fn default() -> ServerLibraryForRead
fn default() -> ServerLibraryForRead
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServerLibraryForRead
impl<'de> Deserialize<'de> for ServerLibraryForRead
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ServerLibraryForRead, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ServerLibraryForRead, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ServerLibrary> for ServerLibraryForRead
impl From<ServerLibrary> for ServerLibraryForRead
Source§fn from(lib: ServerLibrary) -> ServerLibraryForRead
fn from(lib: ServerLibrary) -> ServerLibraryForRead
Converts to this type from the input type.
Source§impl Serialize for ServerLibraryForRead
impl Serialize for ServerLibraryForRead
Source§fn 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
Auto Trait Implementations§
impl Forget for ServerLibraryForRead
impl Freeze for ServerLibraryForReadwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<UserMapping>: Freeze,
PhantomData<LibraryRole>: Freeze,
impl Move for ServerLibraryForRead
impl RefUnwindSafe for ServerLibraryForRead
impl Send for ServerLibraryForReadwhere
RawVecInner: Send,
impl Sync for ServerLibraryForReadwhere
RawVecInner: Sync,
impl Unpin for ServerLibraryForRead
impl UnsafeUnpin for ServerLibraryForReadwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<UserMapping>: UnsafeUnpin,
PhantomData<LibraryRole>: UnsafeUnpin,
impl UnwindSafe for ServerLibraryForReadwhere
RawVecInner: UnwindSafe,
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