pub struct RestrictedDirectory {
pub directory: EncodedString,
}Expand description
We use our own RestrictedDirectory instead of the models because we need to not enforce base64 encoding, and implement a bunch of additional methods and traits that wouldn’t make sense for the models
We also need to keep track if the values are encoded or not
Fields§
§directory: EncodedStringImplementations§
Source§impl RestrictedDirectory
impl RestrictedDirectory
Sourcepub fn new<S: Into<String>>(directory: S) -> Self
pub fn new<S: Into<String>>(directory: S) -> Self
Creates a new RestrictedDirectory from an encoded directory. The directory must be URL safe base64 encoded or Bad Things may happen.
Sourcepub fn to_model(&self) -> RestrictedDirectoryModel
pub fn to_model(&self) -> RestrictedDirectoryModel
Creates a new RestrictedDirectoryModel from self’s data.
Trait Implementations§
Source§impl Clone for RestrictedDirectory
impl Clone for RestrictedDirectory
Source§fn clone(&self) -> RestrictedDirectory
fn clone(&self) -> RestrictedDirectory
Returns a duplicate of the value. Read more
1.0.0 · 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 RestrictedDirectory
impl Debug for RestrictedDirectory
Auto Trait Implementations§
impl Freeze for RestrictedDirectory
impl RefUnwindSafe for RestrictedDirectory
impl Send for RestrictedDirectory
impl Sync for RestrictedDirectory
impl Unpin for RestrictedDirectory
impl UnwindSafe for RestrictedDirectory
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