pub struct ActivityGroupResult {
pub label: String,
pub flip_sign: bool,
pub roots: Vec<ReportNode>,
pub total: Vec<CommodityAmount>,
}Fields§
§label: String§flip_sign: bool§roots: Vec<ReportNode>§total: Vec<CommodityAmount>Raw sum of the root amounts; flip_sign is applied at display time.
Implementations§
Source§impl ActivityGroupResult
impl ActivityGroupResult
Sourcepub fn displayed(&self) -> Result<Self, ReportError>
pub fn displayed(&self) -> Result<Self, ReportError>
The group as clients show it: flip_sign applied to the rows and the total.
§Errors
ReportError::AmountOverflow when an amount cannot be negated.
Sourcepub fn new(
label: String,
flip_sign: bool,
roots: Vec<ReportNode>,
) -> Result<Self, ReportError>
pub fn new( label: String, flip_sign: bool, roots: Vec<ReportNode>, ) -> Result<Self, ReportError>
§Errors
ReportError::AmountOverflow when a total does not fit.
Trait Implementations§
Source§impl Clone for ActivityGroupResult
impl Clone for ActivityGroupResult
Source§impl Debug for ActivityGroupResult
impl Debug for ActivityGroupResult
impl Eq for ActivityGroupResult
Source§impl PartialEq for ActivityGroupResult
impl PartialEq for ActivityGroupResult
Source§impl Serialize for ActivityGroupResult
impl Serialize for ActivityGroupResult
impl StructuralPartialEq for ActivityGroupResult
Auto Trait Implementations§
impl Freeze for ActivityGroupResult
impl RefUnwindSafe for ActivityGroupResult
impl Send for ActivityGroupResult
impl Sync for ActivityGroupResult
impl Unpin for ActivityGroupResult
impl UnsafeUnpin for ActivityGroupResult
impl UnwindSafe for ActivityGroupResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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 more