Skip to main content

Print

Struct Print 

Source
pub struct Print<M = Unselected> { /* private fields */ }
Expand description

p4 print [-a -A -K -o localFile -q -m max --offset offset --size size -Q charset -B utf8bom -L line-ending] [--ignore-changeview] file[revRange] ...

p4 print -U unloadfile ...

p4 print -T attribute [-a -q -o localFile] [--ignore-changeview] file ...

Print the contents of a depot file revision.

The M type parameter tracks which of the three forms of the command is in use at compile time. The default Unselected state prints files without local options; setting any standard option such as Self::all_revisions transitions to StandardPrintMode, Self::from_unload_depot transitions to UnloadDepotMode, and Self::extract_attribute transitions to AttributeTraitMode.

Implementations§

Source§

impl Print<Unselected>

Source

pub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self

Creates a new p4 print command.

bin is the path to the Perforce command-line executable.

Source

pub fn from_unload_depot(self) -> Print<UnloadDepotMode>

§Description

-U

Look for the specified file or files in the unload depot. Data about an unloaded client, label, or task stream can be printed.

Transitions this command to the UnloadDepotMode state; no other local option can be combined with -U.

Source

pub fn extract_attribute( self, name: impl Into<String>, ) -> Print<AttributeTraitMode>

§Description

-T attribute

Print the value of the specified non-encoded attribute of the specified file. This command, rather than p4 fstat -Oa, is appropriate for non-encoded binary attributes larger than 250 megabytes. The p4 fstat -Oa command might fail with the Rpc buffer too big to send error if attributes exceed 250 megabytes. The p4 print command has no option to show the value of the attribute in hex. For that, use the p4 fstat -Oe command.

Transitions this command to the AttributeTraitMode state.

Source

pub fn all_revisions(self, v: bool) -> Print<StandardPrintMode>

§Description

-a

For each file, print all revisions within a specified revision range, rather than only the highest revision in the range.

Transitions this command to the StandardPrintMode state.

Examples found in repository?
examples/print.rs (line 22)
15fn main() -> std::io::Result<()> {
16    let p4 = P4Cli::default();
17
18    // Chain builders: print all revisions of the first two matching files to
19    // a local output file, without the depot header line.
20    let mut print = p4
21        .print()
22        .all_revisions(true)
23        .quiet_mode(true)
24        .limit(2)
25        .redirect_output("print-output.txt");
26
27    // Run the command to completion and capture its output.
28    let file = Path::new("//depot/project/README.md");
29    let output = print.output_with(&[file.as_os_str()])?;
30    println!("{}", String::from_utf8_lossy(&output.stdout));
31
32    // Or stream the contents directly to the terminal with `spawn_with`.
33    let mut child = p4
34        .print()
35        .spawn_with(&[OsStr::new("//depot/project/README.md")])?;
36    child.wait()?;
37
38    Ok(())
39}
Source

pub fn archive_depots(self, v: bool) -> Print<StandardPrintMode>

§Description

-A

Print files in archive depots.

Transitions this command to the StandardPrintMode state.

Source

pub fn suppress_keyword_expansion(self, v: bool) -> Print<StandardPrintMode>

§Description

-K

Suppress RCS keyword expansion. This replaced the -k flag in 2022.1, which is now an alias for -K for backwards compatibility.

Transitions this command to the StandardPrintMode state.

Source

pub fn redirect_output(self, v: impl Into<PathBuf>) -> Print<StandardPrintMode>

§Description

-o localfile

Redirect output to the specified output file (localfile) on the local disk. This preserves the same file type, attributes, and/or permission bits as the original file (FileSpec) in the depot. Multiple files can be written by using wildcards in the localFile argument that match wildcards in the depot (FileSpec) argument. For example: To print the contents of a directory and directories under that directory, use the ... wildcard: p4 print -o c:/tmp/main-copy/... //depot/main/... To print all files that match readme.txt or readme.pdf, you might specify p4 print -o readme.* //depot/readme.*

Transitions this command to the StandardPrintMode state.

Source

pub fn quiet_mode(self, v: bool) -> Print<StandardPrintMode>

§Description

-q

Suppress the one-line file header normally added by P4 Server.

Transitions this command to the StandardPrintMode state.

Source

pub fn limit(self, v: u64) -> Print<StandardPrintMode>

§Description

-m max

Print only the first max files.

Transitions this command to the StandardPrintMode state.

Source

pub fn offset(self, v: u64) -> Print<StandardPrintMode>

§Description

–offset bytesToSkip

(Optional) Skip the specified number of bytes and only print what follows. Can be used with --size.

Transitions this command to the StandardPrintMode state.

Source

pub fn size(self, v: u64) -> Print<StandardPrintMode>

§Description

–size bytesToPrint

(Optional) Print the specified number of bytes from the offset. If --offset is not explicitly set, prints the specified number of bytes from the beginning of the file.

Transitions this command to the StandardPrintMode state.

Source

pub fn charset(self, v: impl Into<String>) -> Print<StandardPrintMode>

§Description

-Q charset

Allow the charset for unicode type files to be explicitly specified, overriding the connection’s P4CHARSET but not overriding the charset of unicode files with versioned charsets.

Transitions this command to the StandardPrintMode state.

Source

pub fn write_utf8bom(self, v: bool) -> Print<StandardPrintMode>

§Description

-B 1 / -B 0

Override the client-side filesys.utf8bom setting, controlling the presence of the byte-order-mark in utf8 type files. With true, write utf8 files with a BOM (-B 1); with false, do not write a BOM (-B 0).

Transitions this command to the StandardPrintMode state.

Source

pub fn write_utf8bom_windows_only(self) -> Print<StandardPrintMode>

§Description

-B 2

Override the client-side filesys.utf8bom setting to write the BOM only on Windows.

Transitions this command to the StandardPrintMode state.

Source

pub fn line_ending_unix(self) -> Print<StandardPrintMode>

§Description

-L unix

Allow the line ending of textual files to be explicitly specified as ‘unix’, ‘win’, or ‘mac’.

Transitions this command to the StandardPrintMode state.

Source

pub fn line_ending_win(self) -> Print<StandardPrintMode>

§Description

-L win

Allow the line ending of textual files to be explicitly specified as ‘unix’, ‘win’, or ‘mac’.

Transitions this command to the StandardPrintMode state.

Source

pub fn line_ending_mac(self) -> Print<StandardPrintMode>

§Description

-L mac

Allow the line ending of textual files to be explicitly specified as ‘unix’, ‘win’, or ‘mac’.

Transitions this command to the StandardPrintMode state.

Source

pub fn ignore_changeview(self, v: bool) -> Print<StandardPrintMode>

§Description

–ignore-changeview

Remove the changelist limit on depot paths. See ChangeView in p4 client.

Transitions this command to the StandardPrintMode state.

Source§

impl<M: ExclusiveOption> Print<M>

Source

pub fn get_global_opts(&self) -> &GlobalOpts

§Description

g-opts

See Global options.

Source

pub fn set_global_opts(&mut self, v: GlobalOpts) -> &mut Self

§Description

g-opts

See Global options.

Source

pub fn global_opts(self, v: GlobalOpts) -> Self

§Description

g-opts

See Global options.

Source§

impl Print<StandardPrintMode>

Source

pub fn get_all_revisions(&self) -> bool

§Description

-a

For each file, print all revisions within a specified revision range, rather than only the highest revision in the range.

Source

pub fn set_all_revisions(&mut self, v: bool) -> &mut Self

§Description

-a

For each file, print all revisions within a specified revision range, rather than only the highest revision in the range.

Source

pub fn all_revisions(self, v: bool) -> Self

§Description

-a

For each file, print all revisions within a specified revision range, rather than only the highest revision in the range.

Source

pub fn get_archive_depots(&self) -> bool

§Description

-A

Print files in archive depots.

Source

pub fn set_archive_depots(&mut self, v: bool) -> &mut Self

§Description

-A

Print files in archive depots.

Source

pub fn archive_depots(self, v: bool) -> Self

§Description

-A

Print files in archive depots.

Source

pub fn get_suppress_keyword_expansion(&self) -> bool

§Description

-K

Suppress RCS keyword expansion. This replaced the -k flag in 2022.1, which is now an alias for -K for backwards compatibility.

Source

pub fn set_suppress_keyword_expansion(&mut self, v: bool) -> &mut Self

§Description

-K

Suppress RCS keyword expansion. This replaced the -k flag in 2022.1, which is now an alias for -K for backwards compatibility.

Source

pub fn suppress_keyword_expansion(self, v: bool) -> Self

§Description

-K

Suppress RCS keyword expansion. This replaced the -k flag in 2022.1, which is now an alias for -K for backwards compatibility.

Source

pub fn get_redirect_output(&self) -> Option<&PathBuf>

§Description

-o localfile

Redirect output to the specified output file (localfile) on the local disk. This preserves the same file type, attributes, and/or permission bits as the original file (FileSpec) in the depot. Multiple files can be written by using wildcards in the localFile argument that match wildcards in the depot (FileSpec) argument. For example: To print the contents of a directory and directories under that directory, use the ... wildcard: p4 print -o c:/tmp/main-copy/... //depot/main/... To print all files that match readme.txt or readme.pdf, you might specify p4 print -o readme.* //depot/readme.*

Source

pub fn set_redirect_output(&mut self, v: impl Into<PathBuf>) -> &mut Self

§Description

-o localfile

Redirect output to the specified output file (localfile) on the local disk. This preserves the same file type, attributes, and/or permission bits as the original file (FileSpec) in the depot. Multiple files can be written by using wildcards in the localFile argument that match wildcards in the depot (FileSpec) argument. For example: To print the contents of a directory and directories under that directory, use the ... wildcard: p4 print -o c:/tmp/main-copy/... //depot/main/... To print all files that match readme.txt or readme.pdf, you might specify p4 print -o readme.* //depot/readme.*

Source

pub fn redirect_output(self, v: impl Into<PathBuf>) -> Self

§Description

-o localfile

Redirect output to the specified output file (localfile) on the local disk. This preserves the same file type, attributes, and/or permission bits as the original file (FileSpec) in the depot. Multiple files can be written by using wildcards in the localFile argument that match wildcards in the depot (FileSpec) argument. For example: To print the contents of a directory and directories under that directory, use the ... wildcard: p4 print -o c:/tmp/main-copy/... //depot/main/... To print all files that match readme.txt or readme.pdf, you might specify p4 print -o readme.* //depot/readme.*

Examples found in repository?
examples/print.rs (line 25)
15fn main() -> std::io::Result<()> {
16    let p4 = P4Cli::default();
17
18    // Chain builders: print all revisions of the first two matching files to
19    // a local output file, without the depot header line.
20    let mut print = p4
21        .print()
22        .all_revisions(true)
23        .quiet_mode(true)
24        .limit(2)
25        .redirect_output("print-output.txt");
26
27    // Run the command to completion and capture its output.
28    let file = Path::new("//depot/project/README.md");
29    let output = print.output_with(&[file.as_os_str()])?;
30    println!("{}", String::from_utf8_lossy(&output.stdout));
31
32    // Or stream the contents directly to the terminal with `spawn_with`.
33    let mut child = p4
34        .print()
35        .spawn_with(&[OsStr::new("//depot/project/README.md")])?;
36    child.wait()?;
37
38    Ok(())
39}
Source

pub fn get_quiet_mode(&self) -> bool

§Description

-q

Suppress the one-line file header normally added by P4 Server.

Source

pub fn set_quiet_mode(&mut self, v: bool) -> &mut Self

§Description

-q

Suppress the one-line file header normally added by P4 Server.

Source

pub fn quiet_mode(self, v: bool) -> Self

§Description

-q

Suppress the one-line file header normally added by P4 Server.

Examples found in repository?
examples/print.rs (line 23)
15fn main() -> std::io::Result<()> {
16    let p4 = P4Cli::default();
17
18    // Chain builders: print all revisions of the first two matching files to
19    // a local output file, without the depot header line.
20    let mut print = p4
21        .print()
22        .all_revisions(true)
23        .quiet_mode(true)
24        .limit(2)
25        .redirect_output("print-output.txt");
26
27    // Run the command to completion and capture its output.
28    let file = Path::new("//depot/project/README.md");
29    let output = print.output_with(&[file.as_os_str()])?;
30    println!("{}", String::from_utf8_lossy(&output.stdout));
31
32    // Or stream the contents directly to the terminal with `spawn_with`.
33    let mut child = p4
34        .print()
35        .spawn_with(&[OsStr::new("//depot/project/README.md")])?;
36    child.wait()?;
37
38    Ok(())
39}
Source

pub fn get_limit(&self) -> Option<u64>

§Description

-m max

Print only the first max files.

Source

pub fn set_limit(&mut self, v: u64) -> &mut Self

§Description

-m max

Print only the first max files.

Source

pub fn limit(self, v: u64) -> Self

§Description

-m max

Print only the first max files.

Examples found in repository?
examples/print.rs (line 24)
15fn main() -> std::io::Result<()> {
16    let p4 = P4Cli::default();
17
18    // Chain builders: print all revisions of the first two matching files to
19    // a local output file, without the depot header line.
20    let mut print = p4
21        .print()
22        .all_revisions(true)
23        .quiet_mode(true)
24        .limit(2)
25        .redirect_output("print-output.txt");
26
27    // Run the command to completion and capture its output.
28    let file = Path::new("//depot/project/README.md");
29    let output = print.output_with(&[file.as_os_str()])?;
30    println!("{}", String::from_utf8_lossy(&output.stdout));
31
32    // Or stream the contents directly to the terminal with `spawn_with`.
33    let mut child = p4
34        .print()
35        .spawn_with(&[OsStr::new("//depot/project/README.md")])?;
36    child.wait()?;
37
38    Ok(())
39}
Source

pub fn get_offset(&self) -> Option<u64>

§Description

–offset bytesToSkip

(Optional) Skip the specified number of bytes and only print what follows. Can be used with --size.

Source

pub fn set_offset(&mut self, v: u64) -> &mut Self

§Description

–offset bytesToSkip

(Optional) Skip the specified number of bytes and only print what follows. Can be used with --size.

Source

pub fn offset(self, v: u64) -> Self

§Description

–offset bytesToSkip

(Optional) Skip the specified number of bytes and only print what follows. Can be used with --size.

Source

pub fn get_size(&self) -> Option<u64>

§Description

–size bytesToPrint

(Optional) Print the specified number of bytes from the offset. If --offset is not explicitly set, prints the specified number of bytes from the beginning of the file.

Source

pub fn set_size(&mut self, v: u64) -> &mut Self

§Description

–size bytesToPrint

(Optional) Print the specified number of bytes from the offset. If --offset is not explicitly set, prints the specified number of bytes from the beginning of the file.

Source

pub fn size(self, v: u64) -> Self

§Description

–size bytesToPrint

(Optional) Print the specified number of bytes from the offset. If --offset is not explicitly set, prints the specified number of bytes from the beginning of the file.

Source

pub fn get_charset(&self) -> Option<&str>

§Description

-Q charset

Allow the charset for unicode type files to be explicitly specified, overriding the connection’s P4CHARSET but not overriding the charset of unicode files with versioned charsets.

Source

pub fn set_charset(&mut self, v: impl Into<String>) -> &mut Self

§Description

-Q charset

Allow the charset for unicode type files to be explicitly specified, overriding the connection’s P4CHARSET but not overriding the charset of unicode files with versioned charsets.

Source

pub fn charset(self, v: impl Into<String>) -> Self

§Description

-Q charset

Allow the charset for unicode type files to be explicitly specified, overriding the connection’s P4CHARSET but not overriding the charset of unicode files with versioned charsets.

Source

pub fn get_utf8bom(&self) -> Option<Utf8Bom>

§Description

-B utf8bom

Override the client-side filesys.utf8bom setting, controlling the presence of the byte-order-mark in utf8 type files.

Source

pub fn set_write_utf8bom(&mut self, v: bool) -> &mut Self

§Description

-B 1 / -B 0

Override the client-side filesys.utf8bom setting, controlling the presence of the byte-order-mark in utf8 type files. With true, write utf8 files with a BOM (-B 1); with false, do not write a BOM (-B 0).

Source

pub fn write_utf8bom(self, v: bool) -> Self

§Description

-B 1 / -B 0

Override the client-side filesys.utf8bom setting, controlling the presence of the byte-order-mark in utf8 type files. With true, write utf8 files with a BOM (-B 1); with false, do not write a BOM (-B 0).

Source

pub fn set_write_utf8bom_windows_only(&mut self) -> &mut Self

§Description

-B 2

Override the client-side filesys.utf8bom setting to write the BOM only on Windows.

Source

pub fn write_utf8bom_windows_only(self) -> Self

§Description

-B 2

Override the client-side filesys.utf8bom setting to write the BOM only on Windows.

Source

pub fn get_line_ending(&self) -> Option<LineEnding>

§Description

-L line-ending

Allow the line ending of textual files to be explicitly specified as ‘unix’, ‘win’, or ‘mac’.

Returns the line ending currently set, or None if no line ending is set.

Source

pub fn set_line_ending_unix(&mut self) -> &mut Self

§Description

-L unix

Allow the line ending of textual files to be explicitly specified as ‘unix’, ‘win’, or ‘mac’.

Source

pub fn line_ending_unix(self) -> Self

§Description

-L unix

Allow the line ending of textual files to be explicitly specified as ‘unix’, ‘win’, or ‘mac’.

Source

pub fn set_line_ending_win(&mut self) -> &mut Self

§Description

-L win

Allow the line ending of textual files to be explicitly specified as ‘unix’, ‘win’, or ‘mac’.

Source

pub fn line_ending_win(self) -> Self

§Description

-L win

Allow the line ending of textual files to be explicitly specified as ‘unix’, ‘win’, or ‘mac’.

Source

pub fn set_line_ending_mac(&mut self) -> &mut Self

§Description

-L mac

Allow the line ending of textual files to be explicitly specified as ‘unix’, ‘win’, or ‘mac’.

Source

pub fn line_ending_mac(self) -> Self

§Description

-L mac

Allow the line ending of textual files to be explicitly specified as ‘unix’, ‘win’, or ‘mac’.

Source

pub fn get_ignore_changeview(&self) -> bool

§Description

–ignore-changeview

Remove the changelist limit on depot paths. See ChangeView in p4 client.

Source

pub fn set_ignore_changeview(&mut self, v: bool) -> &mut Self

§Description

–ignore-changeview

Remove the changelist limit on depot paths. See ChangeView in p4 client.

Source

pub fn ignore_changeview(self, v: bool) -> Self

§Description

–ignore-changeview

Remove the changelist limit on depot paths. See ChangeView in p4 client.

Source§

impl Print<AttributeTraitMode>

Source

pub fn get_attribute(&self) -> &str

§Description

-T attribute

Print the value of the specified non-encoded attribute of the specified file.

Source

pub fn set_attribute(&mut self, v: impl Into<String>) -> &mut Self

§Description

-T attribute

Print the value of the specified non-encoded attribute of the specified file.

Source

pub fn attribute(self, v: impl Into<String>) -> Self

§Description

-T attribute

Print the value of the specified non-encoded attribute of the specified file.

Source

pub fn get_all_revisions(&self) -> bool

§Description

-a

For each file, print all revisions within a specified revision range, rather than only the highest revision in the range.

Source

pub fn set_all_revisions(&mut self, v: bool) -> &mut Self

§Description

-a

For each file, print all revisions within a specified revision range, rather than only the highest revision in the range.

Source

pub fn all_revisions(self, v: bool) -> Self

§Description

-a

For each file, print all revisions within a specified revision range, rather than only the highest revision in the range.

Source

pub fn get_redirect_output(&self) -> Option<&PathBuf>

§Description

-o localfile

Redirect output to the specified output file on the local disk, preserving the same file type, attributes, and/or permission bits as the original file in the depot.

Source

pub fn set_redirect_output(&mut self, v: impl Into<PathBuf>) -> &mut Self

§Description

-o localfile

Redirect output to the specified output file on the local disk, preserving the same file type, attributes, and/or permission bits as the original file in the depot.

Source

pub fn redirect_output(self, v: impl Into<PathBuf>) -> Self

§Description

-o localfile

Redirect output to the specified output file on the local disk, preserving the same file type, attributes, and/or permission bits as the original file in the depot.

Source

pub fn get_quiet_mode(&self) -> bool

§Description

-q

Suppress the one-line file header normally added by the Helix Core Server.

Source

pub fn set_quiet_mode(&mut self, v: bool) -> &mut Self

§Description

-q

Suppress the one-line file header normally added by the Helix Core Server.

Source

pub fn quiet_mode(self, v: bool) -> Self

§Description

-q

Suppress the one-line file header normally added by the Helix Core Server.

Source

pub fn get_ignore_changeview(&self) -> bool

§Description

–ignore-changeview

Remove the changelist limit on depot paths. See ChangeView in p4 client.

Source

pub fn set_ignore_changeview(&mut self, v: bool) -> &mut Self

§Description

–ignore-changeview

Remove the changelist limit on depot paths. See ChangeView in p4 client.

Source

pub fn ignore_changeview(self, v: bool) -> Self

§Description

–ignore-changeview

Remove the changelist limit on depot paths. See ChangeView in p4 client.

Trait Implementations§

Source§

impl<M: Clone> Clone for Print<M>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<M: Debug> Debug for Print<M>

Source§

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

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

impl<M: Default> Default for Print<M>

Source§

fn default() -> Self

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

impl<M: ExclusiveOption> ParameterizedSpawn for Print<M>

Source§

fn spawn_with<'a>( &mut self, files: Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>

Spawns p4 print for the given files as a child process with piped standard output and error streams; use the returned Child handle to wait for it or interact with it.

Source§

type Input<'a> = &'a [&'a OsStr]

Source§

type Output<'a> = Child

Source§

type Error = Error

Source§

impl<M: ExclusiveOption> SubCommand for Print<M>

Source§

fn name(&self) -> &str

Source§

fn inject_local_args(&self, command: &mut Command)

Source§

fn global_opts(&self) -> Option<&GlobalOpts>

Source§

fn inject_args(&self, command: &mut Command)

Source§

fn setup_command<S: AsRef<OsStr>>(&self, bin: S) -> Command

Auto Trait Implementations§

§

impl<M> Freeze for Print<M>
where M: Freeze,

§

impl<M> RefUnwindSafe for Print<M>
where M: RefUnwindSafe,

§

impl<M> Send for Print<M>
where M: Send,

§

impl<M> Sync for Print<M>
where M: Sync,

§

impl<M> Unpin for Print<M>
where M: Unpin,

§

impl<M> UnsafeUnpin for Print<M>
where M: UnsafeUnpin,

§

impl<M> UnwindSafe for Print<M>
where M: UnwindSafe,

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> ParameterizedOutput for T
where T: for<'a> ParameterizedSpawn<Output<'a> = Child, Error = Error>,

Source§

type Input<'a> = <T as ParameterizedSpawn>::Input<'a>

Source§

type Error = Error

Source§

fn output_with<'a>( &mut self, input: <T as ParameterizedOutput>::Input<'a>, ) -> Result<Output, <T as ParameterizedOutput>::Error>

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.