Struct p4_cmd::print::PrintCommand [−][src]
pub struct PrintCommand<'p, 'f> { /* fields omitted */ }
Write a depot file to standard output
Retrieve the contents of a depot file to the client's standard output. The file is not synced. If file is specified using client syntax, Perforce uses the client view to determine the corresponding depot file.
By default, the head revision is printed. If the file argument includes a revision, the specified revision is printed. If the file argument has a revision range, then only files selected by that revision range are printed, and the highest revision in the range is printed. For details about revision specifiers, see 'p4 help revisions'.
Examples
let p4 = p4_cmd::P4::new(); let files = p4.print("//depot/dir/file").run().unwrap(); for file in files { println!("{:?}", file); }
Methods
impl<'p, 'f> PrintCommand<'p, 'f>
[src]
impl<'p, 'f> PrintCommand<'p, 'f>
pub fn new(connection: &'p P4, file: &'f str) -> Self
[src]
pub fn new(connection: &'p P4, file: &'f str) -> Self
pub fn file(self, dir: &'f str) -> Self
[src]
pub fn file(self, dir: &'f str) -> Self
pub fn all_revs(self, all_revs: bool) -> Self
[src]
pub fn all_revs(self, all_revs: bool) -> Self
The -a flag prints all revisions within the specified range, rather than just the highest revision in the range.
pub fn keyword_expansion(self, keyword_expansion: bool) -> Self
[src]
pub fn keyword_expansion(self, keyword_expansion: bool) -> Self
The -k flag suppresses keyword expansion.
pub fn max_files(self, max_files: usize) -> Self
[src]
pub fn max_files(self, max_files: usize) -> Self
The -m flag limits print to the first 'max' number of files.
pub fn run(self) -> Result<Files, P4Error>
[src]
pub fn run(self) -> Result<Files, P4Error>
Run the print
command.
Trait Implementations
impl<'p, 'f> Debug for PrintCommand<'p, 'f>
[src]
impl<'p, 'f> Debug for PrintCommand<'p, 'f>
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<'p, 'f> Clone for PrintCommand<'p, 'f>
[src]
impl<'p, 'f> Clone for PrintCommand<'p, 'f>
fn clone(&self) -> PrintCommand<'p, 'f>
[src]
fn clone(&self) -> PrintCommand<'p, 'f>
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)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'p, 'f> Send for PrintCommand<'p, 'f>
impl<'p, 'f> Send for PrintCommand<'p, 'f>
impl<'p, 'f> Sync for PrintCommand<'p, 'f>
impl<'p, 'f> Sync for PrintCommand<'p, 'f>