pub struct RecordArgs {
pub output: PathBuf,
pub rotate_bytes: Option<u64>,
pub rotate_seconds: Option<u64>,
}Expand description
astrs-record-node command-line arguments.
Fields§
§output: PathBufThe .arec file to write (numbered segments if rotation is set —
see astrs_recording::Writer).
rotate_bytes: Option<u64>Rotate to a new file once the current one would exceed this many bytes.
rotate_seconds: Option<u64>Rotate to a new file once the current one has been open this many seconds.
Implementations§
Source§impl RecordArgs
impl RecordArgs
Sourcepub fn new(output: impl Into<PathBuf>) -> Self
pub fn new(output: impl Into<PathBuf>) -> Self
Arguments for output, with no rotation — the common case for a
direct caller (tests, an embedder) that does not need clap.
Sourcepub const fn with_rotate_bytes(self, bytes: u64) -> Self
pub const fn with_rotate_bytes(self, bytes: u64) -> Self
Sets the byte-count rotation bound.
Sourcepub const fn with_rotate_seconds(self, seconds: u64) -> Self
pub const fn with_rotate_seconds(self, seconds: u64) -> Self
Sets the wall-clock rotation bound.
Sourcepub fn rotation_policy(&self) -> RotationPolicy
pub fn rotation_policy(&self) -> RotationPolicy
This session’s RotationPolicy, derived from the --rotate-*
flags.
Trait Implementations§
Source§impl Args for RecordArgs
impl Args for RecordArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for RecordArgs
impl Clone for RecordArgs
Source§impl CommandFactory for RecordArgs
impl CommandFactory for RecordArgs
Source§impl Debug for RecordArgs
impl Debug for RecordArgs
Source§impl FromArgMatches for RecordArgs
impl FromArgMatches for RecordArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Parser for RecordArgs
impl Parser for RecordArgs
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for RecordArgs
impl RefUnwindSafe for RecordArgs
impl Send for RecordArgs
impl Sync for RecordArgs
impl Unpin for RecordArgs
impl UnsafeUnpin for RecordArgs
impl UnwindSafe for RecordArgs
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