pub struct CanHomRef<'a, R, S>{ /* private fields */ }Expand description
A wrapper of CanHomFrom::Homomorphism that does not own the data associated
with the homomorphism. Use cases are rare, prefer to use CanHom whenever possible.
More concretely, this should only be used when you only have a reference to <R as CanHomFrom<S>>::Homomorphism,
but cannot refactor code to wrap that object in a CanHom instead. The main situation
where this occurs is when implementing CanHomFrom, since a the lifetime of CanHom is
bound by the lifetime of the domain and codomain rings, but CanHomFrom::Type does not allow
this.
§Availability
This API is marked as unstable and is only available when the unstable-enable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.
Implementations§
Source§impl<'a, R, S> CanHomRef<'a, R, S>
impl<'a, R, S> CanHomRef<'a, R, S>
Sourcepub fn raw_hom(&self) -> &<S::Type as CanHomFrom<R::Type>>::Homomorphism
pub fn raw_hom(&self) -> &<S::Type as CanHomFrom<R::Type>>::Homomorphism
§Availability
This API is marked as unstable and is only available when the unstable-enable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.
Sourcepub fn from_raw_parts(
from: R,
to: S,
data: &'a <S::Type as CanHomFrom<R::Type>>::Homomorphism,
) -> Self
pub fn from_raw_parts( from: R, to: S, data: &'a <S::Type as CanHomFrom<R::Type>>::Homomorphism, ) -> Self
§Availability
This API is marked as unstable and is only available when the unstable-enable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.
Trait Implementations§
Source§impl<'a, R, S> Homomorphism<<R as RingStore>::Type, <S as RingStore>::Type> for CanHomRef<'a, R, S>
impl<'a, R, S> Homomorphism<<R as RingStore>::Type, <S as RingStore>::Type> for CanHomRef<'a, R, S>
type CodomainStore = S
type DomainStore = R
fn map(&self, el: El<R>) -> El<S>
fn map_ref(&self, el: &El<R>) -> El<S>
fn domain(&self) -> &R
fn codomain(&self) -> &S
fn mul_assign_map(&self, lhs: &mut Codomain::Element, rhs: Domain::Element)
fn mul_assign_ref_map(&self, lhs: &mut Codomain::Element, rhs: &Domain::Element)
fn mul_map( &self, lhs: Codomain::Element, rhs: Domain::Element, ) -> Codomain::Element
fn mul_ref_fst_map( &self, lhs: &Codomain::Element, rhs: Domain::Element, ) -> Codomain::Element
fn mul_ref_snd_map( &self, lhs: Codomain::Element, rhs: &Domain::Element, ) -> Codomain::Element
fn mul_ref_map( &self, lhs: &Codomain::Element, rhs: &Domain::Element, ) -> Codomain::Element
fn compose<F, PrevDomain: ?Sized + RingBase>(
self,
prev: F,
) -> ComposedHom<PrevDomain, Domain, Codomain, F, Self>where
Self: Sized,
F: Homomorphism<PrevDomain, Domain>,
impl<'a, R, S> Copy for CanHomRef<'a, R, S>
Auto Trait Implementations§
impl<'a, R, S> Freeze for CanHomRef<'a, R, S>
impl<'a, R, S> RefUnwindSafe for CanHomRef<'a, R, S>where
R: RefUnwindSafe,
S: RefUnwindSafe,
<<S as RingStore>::Type as CanHomFrom<<R as RingStore>::Type>>::Homomorphism: RefUnwindSafe,
impl<'a, R, S> Send for CanHomRef<'a, R, S>where
R: Send,
S: Send,
<<S as RingStore>::Type as CanHomFrom<<R as RingStore>::Type>>::Homomorphism: Sync,
impl<'a, R, S> Sync for CanHomRef<'a, R, S>where
R: Sync,
S: Sync,
<<S as RingStore>::Type as CanHomFrom<<R as RingStore>::Type>>::Homomorphism: Sync,
impl<'a, R, S> Unpin for CanHomRef<'a, R, S>
impl<'a, R, S> UnwindSafe for CanHomRef<'a, R, S>where
R: UnwindSafe,
S: UnwindSafe,
<<S as RingStore>::Type as CanHomFrom<<R as RingStore>::Type>>::Homomorphism: RefUnwindSafe,
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<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 more