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§
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 copy 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 more