pub struct Attached<Main, Attachment> { /* private fields */ }Expand description
Pair of main data and attached metadata.
Implementations§
Source§impl<Main, Attachment> Attached<Main, Attachment>
impl<Main, Attachment> Attached<Main, Attachment>
Sourcepub fn into_tuple(attached: Self) -> (Main, Attachment)
pub fn into_tuple(attached: Self) -> (Main, Attachment)
Separate main from attachment.
Trait Implementations§
Source§impl<Main, Attachment> AttachedUtils for Attached<Main, Attachment>
impl<Main, Attachment> AttachedUtils for Attached<Main, Attachment>
Source§type Attachment = Attachment
type Attachment = Attachment
Attached metadata.
Source§fn attachment(&self) -> &Self::Attachment
fn attachment(&self) -> &Self::Attachment
Get an immutable reference to the attached metadata.
Source§fn attachment_mut(&mut self) -> &mut Self::Attachment
fn attachment_mut(&mut self) -> &mut Self::Attachment
Get a mutable reference to the attached data.
Source§fn into_tuple(self) -> (Self::Main, Self::Attachment)
fn into_tuple(self) -> (Self::Main, Self::Attachment)
Separate the main data from the attached metadata.
Source§fn tuple_mut(&mut self) -> (&mut Self::Main, &mut Self::Attachment)
fn tuple_mut(&mut self) -> (&mut Self::Main, &mut Self::Attachment)
Get two mutable reference to the main data and the attached metadata.
Source§fn copy_attachment(&self) -> Self::Attachmentwhere
Self::Attachment: Copy,
fn copy_attachment(&self) -> Self::Attachmentwhere
Self::Attachment: Copy,
Get a copy of the attached metadata.
Source§fn clone_attachment(&self) -> Self::Attachmentwhere
Self::Attachment: Clone,
fn clone_attachment(&self) -> Self::Attachmentwhere
Self::Attachment: Clone,
Get a clone of the attached metadata.
Source§fn map<F, Y>(self, f: F) -> Attached<Y, Self::Attachment>
fn map<F, Y>(self, f: F) -> Attached<Y, Self::Attachment>
Map the main data.
Source§fn flatten(
self,
) -> Attached<<Self::Main as AttachedUtils>::Main, (Self::Attachment, <Self::Main as AttachedUtils>::Attachment)>where
Self::Main: AttachedUtils,
fn flatten(
self,
) -> Attached<<Self::Main as AttachedUtils>::Main, (Self::Attachment, <Self::Main as AttachedUtils>::Attachment)>where
Self::Main: AttachedUtils,
Flatten a pair with nested main.
Source§fn transpose(
self,
) -> Attached<Attached<<Self::Main as AttachedUtils>::Main, Self::Attachment>, <Self::Main as AttachedUtils>::Attachment>where
Self::Main: AttachedUtils,
fn transpose(
self,
) -> Attached<Attached<<Self::Main as AttachedUtils>::Main, Self::Attachment>, <Self::Main as AttachedUtils>::Attachment>where
Self::Main: AttachedUtils,
Swap inner and outer attachment types of a pair with nested main.
Source§fn as_deref(&self) -> Attached<&Self::Main, &Self::Attachment>
fn as_deref(&self) -> Attached<&Self::Main, &Self::Attachment>
Convert an immutable reference of a whole pair to an owned pair of immutable references.
Source§fn as_deref_mut(&mut self) -> Attached<&mut Self::Main, &mut Self::Attachment>
fn as_deref_mut(&mut self) -> Attached<&mut Self::Main, &mut Self::Attachment>
Convert a mutable reference of a whole pair to an owned pair of mutable references.
Source§fn copied(self) -> Attached<<Self::Main as Deref>::Target, Self::Attachment>
fn copied(self) -> Attached<<Self::Main as Deref>::Target, Self::Attachment>
Copy the bits of the main data.
Source§fn cloned(self) -> Attached<<Self::Main as Deref>::Target, Self::Attachment>
fn cloned(self) -> Attached<<Self::Main as Deref>::Target, Self::Attachment>
Clone the main data.
Source§fn copied_attachment(
self,
) -> Attached<Self::Main, <Self::Attachment as Deref>::Target>
fn copied_attachment( self, ) -> Attached<Self::Main, <Self::Attachment as Deref>::Target>
Copy the bits of the attached metadata.
Source§fn cloned_attachment(
self,
) -> Attached<Self::Main, <Self::Attachment as Deref>::Target>
fn cloned_attachment( self, ) -> Attached<Self::Main, <Self::Attachment as Deref>::Target>
Clone the attached metadata.
Source§fn replace_attachment(
&mut self,
attachment: Self::Attachment,
) -> Self::Attachment
fn replace_attachment( &mut self, attachment: Self::Attachment, ) -> Self::Attachment
Replace the attached metadata.
Source§impl<Main, Attachment> Error for Attached<Main, Attachment>
impl<Main, Attachment> Error for Attached<Main, Attachment>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<'a, Querier: Query<'a>, Attachment> Query<'a> for Attached<Querier, Attachment>
impl<'a, Querier: Query<'a>, Attachment> Query<'a> for Attached<Querier, Attachment>
fn query_raw_text(&self, field: ParsedField) -> Option<&'a str>
fn file_name(&self) -> Option<FileName<'a>>
fn name(&self) -> Option<Name<'a>>
fn base(&self) -> Option<Base<'a>>
fn version(&self) -> Option<Version<'a>>
fn description(&self) -> Option<Description<'a>>
fn groups(&self) -> Option<GroupList<'a>>
fn compressed_size(&self) -> Option<Size<'a>>
fn installed_size(&self) -> Option<Size<'a>>
fn md5_checksum(&self) -> Option<Hex128<'a>>
fn sha256_checksum(&self) -> Option<Hex256<'a>>
fn pgp_signature(&self) -> Option<PgpSignature<'a>>
fn url(&self) -> Option<Url<'a>>
fn license(&self) -> Option<LicenseList<'a>>
fn architecture(&self) -> Option<ArchitectureList<'a>>
fn build_date(&self) -> Option<Timestamp<'a>>
fn packager(&self) -> Option<Packager<'a>>
fn dependencies(&self) -> Option<DependencyList<'a>>
fn make_dependencies(&self) -> Option<DependencyList<'a>>
fn check_dependencies(&self) -> Option<DependencyList<'a>>
fn opt_dependencies(&self) -> Option<DependencyAndReasonList<'a>>
fn provides(&self) -> Option<DependencyList<'a>>
fn conflicts(&self) -> Option<DependencyList<'a>>
fn replaces(&self) -> Option<DependencyList<'a>>
Source§impl<'a, Querier: QueryMut<'a>, Attachment> QueryMut<'a> for Attached<Querier, Attachment>
impl<'a, Querier: QueryMut<'a>, Attachment> QueryMut<'a> for Attached<Querier, Attachment>
fn query_raw_text_mut(&mut self, field: ParsedField) -> Option<&'a str>
fn file_name_mut(&mut self) -> Option<FileName<'a>>
fn name_mut(&mut self) -> Option<Name<'a>>
fn base_mut(&mut self) -> Option<Base<'a>>
fn version_mut(&mut self) -> Option<Version<'a>>
fn description_mut(&mut self) -> Option<Description<'a>>
fn groups_mut(&mut self) -> Option<GroupList<'a>>
fn compressed_size_mut(&mut self) -> Option<Size<'a>>
fn installed_size_mut(&mut self) -> Option<Size<'a>>
fn md5_checksum_mut(&mut self) -> Option<Hex128<'a>>
fn sha256_checksum_mut(&mut self) -> Option<Hex256<'a>>
fn pgp_signature_mut(&mut self) -> Option<PgpSignature<'a>>
fn url_mut(&mut self) -> Option<Url<'a>>
fn license_mut(&mut self) -> Option<LicenseList<'a>>
fn architecture_mut(&mut self) -> Option<ArchitectureList<'a>>
fn build_date_mut(&mut self) -> Option<Timestamp<'a>>
fn packager_mut(&mut self) -> Option<Packager<'a>>
fn dependencies_mut(&mut self) -> Option<DependencyList<'a>>
fn make_dependencies_mut(&mut self) -> Option<DependencyList<'a>>
fn check_dependencies_mut(&mut self) -> Option<DependencyList<'a>>
fn opt_dependencies_mut(&mut self) -> Option<DependencyAndReasonList<'a>>
fn provides_mut(&mut self) -> Option<DependencyList<'a>>
fn conflicts_mut(&mut self) -> Option<DependencyList<'a>>
fn replaces_mut(&mut self) -> Option<DependencyList<'a>>
Source§impl<Querier: ReuseAdvice, Attachment> ReuseAdvice for Attached<Querier, Attachment>
impl<Querier: ReuseAdvice, Attachment> ReuseAdvice for Attached<Querier, Attachment>
Source§type ShouldReuse = <Querier as ReuseAdvice>::ShouldReuse
type ShouldReuse = <Querier as ReuseAdvice>::ShouldReuse
Whether the querier should be reused.
impl<Main: Copy, Attachment: Copy> Copy for Attached<Main, Attachment>
Auto Trait Implementations§
impl<Main, Attachment> Freeze for Attached<Main, Attachment>
impl<Main, Attachment> RefUnwindSafe for Attached<Main, Attachment>where
Main: RefUnwindSafe,
Attachment: RefUnwindSafe,
impl<Main, Attachment> Send for Attached<Main, Attachment>
impl<Main, Attachment> Sync for Attached<Main, Attachment>
impl<Main, Attachment> Unpin for Attached<Main, Attachment>
impl<Main, Attachment> UnwindSafe for Attached<Main, Attachment>where
Main: UnwindSafe,
Attachment: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Main> IntoAttached for Main
impl<Main> IntoAttached for Main
Source§fn into_attached<Attachment>(
self,
attachment: Attachment,
) -> Attached<Self, Attachment>
fn into_attached<Attachment>( self, attachment: Attachment, ) -> Attached<Self, Attachment>
Attach metadata to an object.
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 moreSource§impl<T> Is for T
impl<T> Is for T
type Type = T
fn into_val(self) -> <T as Is>::Type
fn into_ref(&self) -> &<T as Is>::Type
fn into_mut_ref(&mut self) -> &mut <T as Is>::Type
fn from_val(x: <T as Is>::Type) -> T
fn from_ref(x: &<T as Is>::Type) -> &T
fn from_mut_ref(x: &mut <T as Is>::Type) -> &mut T
Source§impl<X> Pipe for X
impl<X> Pipe for X
Source§fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
Source§fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
Source§fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait AsRef<Param>. Read moreSource§fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait AsMut<Param>. Read moreSource§fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Target = Param>. Read moreSource§fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait DerefMut<Target = Param>. Read moreSource§fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait Borrow<Param>. Read moreSource§fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Return
fn pipe_borrow_mut<'a, Param, Return, Function>( &'a mut self, f: Function, ) -> Return
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait BorrowMut<Param>. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<Querier> ReuseAdviceBool for Querierwhere
Querier: ReuseAdvice + ?Sized,
impl<Querier> ReuseAdviceBool for Querierwhere
Querier: ReuseAdvice + ?Sized,
Source§const SHOULD_REUSE: bool = <Self::ShouldReuse>::VALUE
const SHOULD_REUSE: bool = <Self::ShouldReuse>::VALUE
The value of
ReuseAdvice::ShouldReuse as a bool.Source§impl<Querier> ReuseAdviceSelf for Querierwhere
Querier: ReuseAdvice + ?Sized,
impl<Querier> ReuseAdviceSelf for Querierwhere
Querier: ReuseAdvice + ?Sized,
Source§fn should_reuse(&self) -> bool
fn should_reuse(&self) -> bool
Determine wether
self should be reused.