pub struct ReflectedCore {
pub headers: HeaderMap,
pub status: StatusCode,
pub body: Substance,
}
Fields§
§headers: HeaderMap
§status: StatusCode
§body: Substance
Implementations§
Source§impl ReflectedCore
impl ReflectedCore
pub fn to_err(&self) -> SpaceErr
pub fn ok_html(html: &str) -> Self
pub fn new() -> Self
pub fn result(result: Result<ReflectedCore, SpaceErr>) -> ReflectedCore
pub fn ok() -> Self
pub fn ok_body(body: Substance) -> Self
pub fn timeout() -> Self
pub fn server_error() -> Self
pub fn status(status: u16) -> Self
pub fn not_found() -> Self
pub fn forbidden() -> Self
pub fn bad_request() -> Self
pub fn fail<S: ToString>(status: u16, message: S) -> Self
pub fn err(err: SpaceErr) -> Self
pub fn with_new_substance(self, substance: Substance) -> Self
pub fn is_ok(&self) -> bool
pub fn into_reflection<P>(
self,
intended: Surface,
to: P,
reflection_of: WaveId,
) -> Pongwhere
P: ToSurface,
Trait Implementations§
Source§impl Clone for ReflectedCore
impl Clone for ReflectedCore
Source§fn clone(&self) -> ReflectedCore
fn clone(&self) -> ReflectedCore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ReflectedCore
impl Debug for ReflectedCore
Source§impl<'de> Deserialize<'de> for ReflectedCore
impl<'de> Deserialize<'de> for ReflectedCore
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<()> for ReflectedCore
impl From<()> for ReflectedCore
Source§impl From<ParticleLocation> for ReflectedCore
impl From<ParticleLocation> for ReflectedCore
Source§fn from(location: ParticleLocation) -> Self
fn from(location: ParticleLocation) -> Self
Converts to this type from the input type.
Source§impl From<ReflectedCore> for Substance
impl From<ReflectedCore> for Substance
Source§fn from(f: ReflectedCore) -> Substance
fn from(f: ReflectedCore) -> Substance
Converts to this type from the input type.
Source§impl From<Result<ReflectedCore, SpaceErr>> for ReflectedCore
impl From<Result<ReflectedCore, SpaceErr>> for ReflectedCore
Source§impl Into<ReflectedCore> for SpaceErr
impl Into<ReflectedCore> for SpaceErr
Source§fn into(self) -> ReflectedCore
fn into(self) -> ReflectedCore
Converts this type into the (usually inferred) input type.
Source§impl Into<ReflectedCore> for Surface
impl Into<ReflectedCore> for Surface
Source§fn into(self) -> ReflectedCore
fn into(self) -> ReflectedCore
Converts this type into the (usually inferred) input type.
Source§impl PartialEq for ReflectedCore
impl PartialEq for ReflectedCore
Source§impl Serialize for ReflectedCore
impl Serialize for ReflectedCore
Source§impl ToSubstance<ReflectedCore> for Substance
impl ToSubstance<ReflectedCore> for Substance
fn to_substance(self) -> Result<ReflectedCore, SpaceErr>
fn to_substance_ref(&self) -> Result<&ReflectedCore, SpaceErr>
Source§impl<S> ToSubstance<S> for ReflectedCorewhere
Substance: ToSubstance<S>,
impl<S> ToSubstance<S> for ReflectedCorewhere
Substance: ToSubstance<S>,
Source§impl TryFrom<ReflectedCore> for Surface
impl TryFrom<ReflectedCore> for Surface
Source§impl TryInto<ReflectedCore> for Substance
impl TryInto<ReflectedCore> for Substance
impl Eq for ReflectedCore
impl StructuralPartialEq for ReflectedCore
Auto Trait Implementations§
impl Freeze for ReflectedCore
impl RefUnwindSafe for ReflectedCore
impl Send for ReflectedCore
impl Sync for ReflectedCore
impl Unpin for ReflectedCore
impl UnwindSafe for ReflectedCore
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
Source§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more