Struct p4_cmd::FileType [−][src]
pub struct FileType { pub base: BaseFileType, pub modifiers: Option<FileTypeModifiers>, // some fields omitted }
Perforce file type.
Example
let mut modifiers = p4_cmd::FileTypeModifiers::default(); modifiers.exclusive = true; let ft = p4_cmd::FileType::new() .base(p4_cmd::BaseFileType::Binary) .modifiers(Some(modifiers)); assert_eq!(ft.to_string(), "binary+l"); assert_eq!("binary+l".parse::<p4_cmd::FileType>().unwrap(), ft);
Fields
base: BaseFileType
The base Perforce file type
modifiers: Option<FileTypeModifiers>
Methods
impl FileType
[src]
impl FileType
pub fn new() -> Self
[src]
pub fn new() -> Self
pub fn base(self, base: BaseFileType) -> Self
[src]
pub fn base(self, base: BaseFileType) -> Self
pub fn modifiers(self, modifiers: Option<FileTypeModifiers>) -> Self
[src]
pub fn modifiers(self, modifiers: Option<FileTypeModifiers>) -> Self
Trait Implementations
impl Debug for FileType
[src]
impl Debug for FileType
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for FileType
[src]
impl Clone for FileType
fn clone(&self) -> FileType
[src]
fn clone(&self) -> FileType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for FileType
[src]
impl PartialEq for FileType
fn eq(&self, other: &FileType) -> bool
[src]
fn eq(&self, other: &FileType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &FileType) -> bool
[src]
fn ne(&self, other: &FileType) -> bool
This method tests for !=
.
impl Eq for FileType
[src]
impl Eq for FileType
impl Default for FileType
[src]
impl Default for FileType
impl FromStr for FileType
[src]
impl FromStr for FileType
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a string s
to return a value of this type. Read more
impl Display for FileType
[src]
impl Display for FileType