Skip to main content

Paths

Struct Paths 

Source
pub struct Paths {
    pub core: TokenStream,
    pub transport: TokenStream,
    pub this: TokenStream,
    pub marker: TokenStream,
}
Expand description

The paths generated code names its crates by. A transport’s macro crate builds one: the core is always ::ulo, which #[handlers] and __enhancer_specs! name too, so an application depends on ulo directly. What the generated call reads besides the core is reached through the transport crate, so an application needs no direct dependency on ulo-transport for what a handler attribute generates.

Fields§

§core: TokenStream

::ulo.

§transport: TokenStream

The path whose __private module supplies what the generated call names: Param and controller, which extract each parameter and resolve the controller, and the reply probe IntoReplyProbe with its arms ViaCallError, ViaBoxError and ViaValue.

Paths::new points it at ulo-transport as the transport crate re-exports it, ::ulo_http::__private::transport, whose probe converts a value through IntoReply<T>. A transport whose answers that probe cannot convert points it at a crate of its own carrying the same names: the RPC attributes at ::ulo_rpc, whose __private re-exports Param and controller from ulo-transport beside its own probe, which also answers a bare Serialize value and a stream; the WebSocket attribute at ::ulo_ws::__private::reply, whose probe answers (), a Serialize value, a Frame and a stream.

§this: TokenStream

The transport crate itself: ::ulo_http.

§marker: TokenStream

The transport marker type: ::ulo_http::Http.

Implementations§

Source§

impl Paths

Source

pub fn new(krate: &str, marker: &str) -> Self

::ulo, with the transport crate’s ::<krate>, its __private::transport re-export and its marker ::<krate>::<Marker>.

Trait Implementations§

Source§

impl Clone for Paths

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl !Send for Paths

§

impl !Sync for Paths

§

impl Forget for Paths

§

impl Freeze for Paths

§

impl Move for Paths

§

impl RefUnwindSafe for Paths

§

impl Unpin for Paths

§

impl UnsafeUnpin for Paths

§

impl UnwindSafe for Paths

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.