Enum BaseFileType

Source
pub enum BaseFileType {
    Text,
    Binary,
    Symlink,
    Unicode,
    Utf8,
    Utf16,
    Unknown(String),
    // some variants omitted
}
Expand description

Perforce base file type.

§Example

assert_eq!(p4_cmd::BaseFileType::Utf8.to_string(), "utf8");
assert_eq!("utf8".parse::<p4_cmd::BaseFileType>().unwrap(), p4_cmd::BaseFileType::Utf8);

Variants§

§

Text

Text file

Synced as text in the workspace. Line-ending translations are performed automatically.

Stored as: deltas in RCS format

§

Binary

Non-text file

Synced as binary files in the workspace. Stored compressed within the depot.

Stored as: full file, compressed

Symbolic link

Helix Server applications on UNIX, OS X, recent versions of Windows treat these files as symbolic links. On other platforms, these files appear as (small) text files.

On Windows, you require admin privileges or an appropriate group policy must be set, otherwise, you get text files.

Stored as: deltas in RCS format

§

Unicode

Unicode file

Services operating in unicode mode support the unicode file type. These files are translated into the local character set specified by P4CHARSET.

Line-ending translations are performed automatically.

Services not in unicode mode do not support the unicode file type.

Stored as: RCS deltas in UTF-8 format

§

Utf8

Unicode file

Synced in the client workspace with the UTF-8 BOM (byte order mark).

Whether the service is in unicode mode or not, files are transferred as UTF-8 in the client workspace.

Line-ending translations are performed automatically.

Stored as: RCS deltas in UTF-8 format without the UTF-8 BOM (byte order mark).

§

Utf16

Unicode file

Whether the service is in unicode mode or not, files are transferred as UTF-8, and translated to UTF-16 (with byte order mark, in the byte order appropriate for the user’s machine) in the client workspace.

Line-ending translations are performed automatically.

Stored as: RCS deltas in UTF-8 format

§

Unknown(String)

Trait Implementations§

Source§

impl Clone for BaseFileType

Source§

fn clone(&self) -> BaseFileType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BaseFileType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BaseFileType

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for BaseFileType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for BaseFileType

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for BaseFileType

Source§

fn eq(&self, other: &BaseFileType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for BaseFileType

Source§

impl StructuralPartialEq for BaseFileType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.