pub struct PrintCommand<'p, 'f> { /* private fields */ }
Expand description
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);
}
Implementations§
Source§impl<'p, 'f> PrintCommand<'p, 'f>
impl<'p, 'f> PrintCommand<'p, 'f>
pub fn new(connection: &'p P4, file: &'f str) -> Self
pub fn file(self, dir: &'f str) -> Self
Sourcepub fn all_revs(self, all_revs: bool) -> Self
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.
Sourcepub fn keyword_expansion(self, keyword_expansion: bool) -> Self
pub fn keyword_expansion(self, keyword_expansion: bool) -> Self
The -k flag suppresses keyword expansion.
Trait Implementations§
Source§impl<'p, 'f> Clone for PrintCommand<'p, 'f>
impl<'p, 'f> Clone for PrintCommand<'p, 'f>
Source§fn clone(&self) -> PrintCommand<'p, 'f>
fn clone(&self) -> PrintCommand<'p, 'f>
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 moreAuto Trait Implementations§
impl<'p, 'f> Freeze for PrintCommand<'p, 'f>
impl<'p, 'f> RefUnwindSafe for PrintCommand<'p, 'f>
impl<'p, 'f> Send for PrintCommand<'p, 'f>
impl<'p, 'f> Sync for PrintCommand<'p, 'f>
impl<'p, 'f> Unpin for PrintCommand<'p, 'f>
impl<'p, 'f> UnwindSafe for PrintCommand<'p, 'f>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more