pub struct MemoryManager;Expand description
Selects the deterministic in-memory interpretation of manager carriers.
Trait Implementations§
Source§impl Clone for MemoryManager
impl Clone for MemoryManager
impl Copy for MemoryManager
Source§impl Debug for MemoryManager
impl Debug for MemoryManager
Source§impl Default for MemoryManager
impl Default for MemoryManager
Source§impl DownloadsAlg for MemoryManager
impl DownloadsAlg for MemoryManager
Source§fn empty_downloads(&self) -> Self::Downloads
fn empty_downloads(&self) -> Self::Downloads
Source§impl DownloadsLawFixture for MemoryManager
impl DownloadsLawFixture for MemoryManager
impl Eq for MemoryManager
Source§impl ManagerSorts for MemoryManager
impl ManagerSorts for MemoryManager
Source§type Source = SourceRequest
type Source = SourceRequest
Source§type Options = DownloadOptions
type Options = DownloadOptions
Source§type Change = PlannedChange
type Change = PlannedChange
Source§type Downloads = ManagerState
type Downloads = ManagerState
Source§impl MediaOptionsAlg for MemoryManager
impl MediaOptionsAlg for MemoryManager
Source§impl OutputChoiceAlg for MemoryManager
impl OutputChoiceAlg for MemoryManager
Source§fn suggested_output(&self) -> Self::Output
fn suggested_output(&self) -> Self::Output
Source§impl PartialEq for MemoryManager
impl PartialEq for MemoryManager
Source§impl SourceRecognitionAlg for MemoryManager
impl SourceRecognitionAlg for MemoryManager
Source§fn recognizes_source(&self, line: &str) -> bool
fn recognizes_source(&self, line: &str) -> bool
Source§impl SourceRequestAlg for MemoryManager
impl SourceRequestAlg for MemoryManager
impl StructuralPartialEq for MemoryManager
Source§impl SubmissionAlg for MemoryManager
impl SubmissionAlg for MemoryManager
Auto Trait Implementations§
impl Freeze for MemoryManager
impl RefUnwindSafe for MemoryManager
impl Send for MemoryManager
impl Sync for MemoryManager
impl Unpin for MemoryManager
impl UnsafeUnpin for MemoryManager
impl UnwindSafe for MemoryManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<This> DownloadsExt<This> for Thiswhere
This: DownloadsAlg + SourceRequestAlg,
<This as ManagerSorts>::Downloads: DownloadCollectionAlg<Source = <This as ManagerSorts>::Source>,
impl<This> DownloadsExt<This> for Thiswhere
This: DownloadsAlg + SourceRequestAlg,
<This as ManagerSorts>::Downloads: DownloadCollectionAlg<Source = <This as ManagerSorts>::Source>,
Source§fn downloads(
&self,
sources: impl IntoIterator<Item = <This as ManagerSorts>::Source>,
) -> <This as ManagerSorts>::Downloads
fn downloads( &self, sources: impl IntoIterator<Item = <This as ManagerSorts>::Source>, ) -> <This as ManagerSorts>::Downloads
Defines a downloads collection containing sources in declaration order.
Source§impl<This, Source> DownloadsLaws<This, Source> for Thiswhere
This: ManagerSorts<Source = Source> + DownloadsAlg + SourceRequestAlg + SubmissionAlg + MediaOptionsAlg + OutputChoiceAlg + DownloadsLawFixture,
<This as ManagerSorts>::Downloads: DownloadCollectionAlg<Source = Source>,
impl<This, Source> DownloadsLaws<This, Source> for Thiswhere
This: ManagerSorts<Source = Source> + DownloadsAlg + SourceRequestAlg + SubmissionAlg + MediaOptionsAlg + OutputChoiceAlg + DownloadsLawFixture,
<This as ManagerSorts>::Downloads: DownloadCollectionAlg<Source = Source>,
Source§fn downloads_laws(&self) -> Result<(), Error>
fn downloads_laws(&self) -> Result<(), Error>
Checks that a collection holds exactly the sources it was given, in the order given.
The laws checked are:
- the empty collection holds nothing;
- a collection holds its sources in declaration order;
- adding appends after what the collection already holds.
§Errors
Returns the first violated law.
Source§impl<This> GaugeLaws<This> for This
impl<This> GaugeLaws<This> for This
Source§fn gauge_laws(&self) -> Result<(), Error>
fn gauge_laws(&self) -> Result<(), Error>
Checks that a gauge states a share without claiming more resolution than it has.
The laws checked are:
- a gauge occupies its stated width whatever share it states;
- no share is stated as filled before it is reached, and none is stated twice;
- nothing stated is nothing filled, and everything stated fills the whole track;
- the stated text occupies exactly one cell per counted cell.
§Errors
Returns the first violated law.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<This> IntoExt<This> for This
impl<This> IntoExt<This> for This
Source§fn to<R>(self) -> Rwhere
This: Into<R>,
fn to<R>(self) -> Rwhere
This: Into<R>,
A version of Into::into function that can be used to explicitly specify the target
conversion type.
use alux_sdk::*;
// `Into` requires context to infer the type,
let _: i64 = Into::into(42_i8);
// The opposite `From` requires context to infer the type,
let _: i64 = From::from(42_i8);
// `.to()` can be used in the same way as a postfix function (the same as `.into()`),
let _: i64 = 42_i8.to();
// but also with the type specified explicitly.
let _ = 42_i8.to::<i64>();
// Especially useful to chain multiple conversions inline.
let _: i64 = 42_i8.to::<i16>().to::<i32>().into();Source§impl<This> IntoIteratorExt<This> for This
impl<This> IntoIteratorExt<This> for This
Source§fn try_collect_vec<T, E>(self) -> Result<Vec<T>, E>
fn try_collect_vec<T, E>(self) -> Result<Vec<T>, E>
A variant of the try_collect and collect_vec combined function from the Itertools
library. The materialized value is a Vec inside a Result object.
Returns the first error without collecting later values.
use alux_sdk::*;
let values = [Ok::<_, &str>(1), Ok(2), Ok(3)]
.into_iter()
.try_collect_vec();
assert_eq!(values, Ok(vec![1, 2, 3]));Source§fn collect_exact<T>(self, n: usize) -> Option<Vec<T>>where
This: Iterator<Item = T>,
fn collect_exact<T>(self, n: usize) -> Option<Vec<T>>where
This: Iterator<Item = T>,
Takes exactly n elements from the iterator.
Returns Some(Vec<T>) if the iterator yields exactly n elements,
otherwise returns None.
use alux_sdk::*;
let v = [1, 2, 3];
assert_eq!(v.iter().copied().collect_exact(3), Some(vec![1, 2, 3]));
assert_eq!(v.iter().copied().collect_exact(4), None);
assert_eq!(v.iter().copied().collect_exact(2), None);Source§fn try_unzip<A, B, E>(self) -> Result<(Vec<A>, Vec<B>), E>
fn try_unzip<A, B, E>(self) -> Result<(Vec<A>, Vec<B>), E>
Efficiently splits an iterator of Result<(A, B), E> into two Vecs, short-circuiting on error.
Consumes the iterator, collecting all A elements into one vector and all B elements into another,
without first allocating an intermediate vector of tuples. Returns the tuple (Vec<A>, Vec<B>) on success,
or the first error encountered.
use alux_sdk::*;
let input = vec![Ok((1, "x")), Ok((2, "y"))];
let (xs, ys) = input.try_unzip::<_, _, ()>().unwrap();
assert_eq!(xs, vec![1, 2]);
assert_eq!(ys, vec!["x", "y"]);Source§impl<This> ProgressiveDownloadsExt<This> for Thiswhere
This: DownloadsAlg + SourceRequestAlg + MediaOptionsAlg + OutputChoiceAlg,
<This as ManagerSorts>::Downloads: DownloadCollectionAlg<Source = <This as ManagerSorts>::Source>,
impl<This> ProgressiveDownloadsExt<This> for Thiswhere
This: DownloadsAlg + SourceRequestAlg + MediaOptionsAlg + OutputChoiceAlg,
<This as ManagerSorts>::Downloads: DownloadCollectionAlg<Source = <This as ManagerSorts>::Source>,
Source§fn progressive_downloads(
&self,
sources: impl IntoIterator<Item = impl Into<String>>,
) -> <This as ManagerSorts>::Downloads
fn progressive_downloads( &self, sources: impl IntoIterator<Item = impl Into<String>>, ) -> <This as ManagerSorts>::Downloads
Defines a downloads collection from source names using progressive media and suggested output naming.