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]) -> Self
pub fn with_roles(lib: ServerLibrary, roles: &[LibraryRole]) -> Self
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§impl Debug for ServerLibraryForRead
impl Debug for ServerLibraryForRead
Source§impl Default for ServerLibraryForRead
impl Default for ServerLibraryForRead
Source§impl<'de> Deserialize<'de> for ServerLibraryForRead
impl<'de> Deserialize<'de> for ServerLibraryForRead
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>,
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) -> Self
fn from(lib: ServerLibrary) -> Self
Converts to this type from the input type.
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