FromRef

Trait FromRef 

Source
pub trait FromRef<InputTy> {
    // Required method
    fn from_ref(input: &InputTy) -> Self;
}
Available on crate features clients or servers only.
Expand description

Used to do reference-to-value conversions thus not consuming the input value.

This is mainly used with state’s to extract “substates” from a reference to main application state.

Required Methods§

Source

fn from_ref(input: &InputTy) -> Self

Converts to this type from a reference to the input type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromRef<PcfsServerState> for u32

Available on crate feature servers only.
Source§

fn from_ref(input: &PcfsServerState) -> Self

Available on crate features clients or servers only.
Source§

impl<Ty, State: Clone + Send + Sync + 'static> FromRef<Request<State>> for Option<Extension<Ty>>
where Ty: Clone + Send + Sync + 'static,

Available on crate feature servers only.
Source§

fn from_ref(input: &Request<State>) -> Self

Implementors§

Source§

impl FromRef<PcfsServerState> for HostFilesystem

Available on crate feature servers only.
Source§

impl FromRef<SdioStreamState> for MionBootType

Available on crate feature servers only.
Source§

impl FromRef<SdioStreamState> for HostFilesystem

Available on crate feature servers only.
Source§

impl<InnerTy> FromRef<InnerTy> for InnerTy
where InnerTy: Clone,