Struct seaplane_cli::ops::restrict::RestrictedDirectory
source · [−]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
sourceimpl 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
sourceimpl Clone for RestrictedDirectory
impl Clone for RestrictedDirectory
sourcefn clone(&self) -> RestrictedDirectory
fn clone(&self) -> RestrictedDirectory
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for RestrictedDirectory
impl Debug for RestrictedDirectory
sourceimpl Serialize for RestrictedDirectory
impl Serialize for RestrictedDirectory
Auto Trait Implementations
impl RefUnwindSafe for RestrictedDirectory
impl Send for RestrictedDirectory
impl Sync for RestrictedDirectory
impl Unpin for RestrictedDirectory
impl UnwindSafe for RestrictedDirectory
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