Struct ContentLane
pub struct ContentLane { /* private fields */ }Expand description
Where one record’s content store and its window’s collaboration meet.
Implementations§
§impl ContentLane
impl ContentLane
pub fn show_on_route(app: &str, record: &str, lane: &Arc<ContentLane>)
pub fn show_on_route(app: &str, record: &str, lane: &Arc<ContentLane>)
lane, a window’s own (Self::of_window), carries the content of
record record (its wire name) of app app: whatever moves that
record’s content for the process, rather than the window’s own
collaboration (a browser page’s replication), reaches it through
Self::on_route for as long as the window keeps it.
pub fn on_route(app: &str, record: &str) -> Vec<Arc<ContentLane>>
pub fn on_route(app: &str, record: &str) -> Vec<Arc<ContentLane>>
Every lane carrying record record (its wire name) of app app’s
content in this process: the record’s own (Self::of) and those of
the windows showing it (Self::show_on_route). What their windows
ask for is asked of the record’s route, and what arrives on it is
handed to each.
pub fn of(app: &str, record: &str) -> Arc<ContentLane> ⓘ
pub fn of(app: &str, record: &str) -> Arc<ContentLane> ⓘ
The lane of record record of app app in this process.
pub fn of_window() -> Arc<ContentLane> ⓘ
pub fn of_window() -> Arc<ContentLane> ⓘ
The lane of the window whose code is running: the one it keeps
(keep_lane), made for it when it keeps none yet.
A lane belongs to a window, not to a record: two windows of one app showing the same record queue their wants and their offers apart, so what one asks for is never what the other thinks it asked. The record travels on its route either way; its route is the same for both windows, its lane is not.
pub fn record_store(route: &RouteSpec) -> ContentStore
pub fn record_store(route: &RouteSpec) -> ContentStore
The content store of the record route names, when it is not the
window’s own: what it references is read from and kept by the host
under that record’s scope, and travels on its route alone. This
device holds the bytes for the app only while it runs.
pub fn routed(app: &str) -> Vec<(RouteSpec, Arc<ContentLane>)>
pub fn routed(app: &str) -> Vec<(RouteSpec, Arc<ContentLane>)>
The lanes of app app’s records that are not a window’s own, with
the routes they send on.
pub fn serve(&self)
pub fn serve(&self)
The record’s host answered the route’s content subscription: what the app stores reaches the record’s other readers by its address.
pub fn attach(&self, wake: WakeHandle)
pub fn attach(&self, wake: WakeHandle)
Wake wake’s owner when the store has something for the route.
pub fn take_requests(&self) -> LaneRequests
pub fn take_requests(&self) -> LaneRequests
The requests to send on the record’s route now.
pub fn retry_want(&self, hash: String)
pub fn retry_want(&self, hash: String)
Put back a request the route could not take yet.
pub fn retry_offer(&self, hash: String, bytes: Vec<u8>)
pub fn retry_offer(&self, hash: String, bytes: Vec<u8>)
Put back an offer the route could not take yet.
Trait Implementations§
§impl Default for ContentLane
impl Default for ContentLane
§fn default() -> ContentLane
fn default() -> ContentLane
Auto Trait Implementations§
impl !Freeze for ContentLane
impl !RefUnwindSafe for ContentLane
impl Send for ContentLane
impl Sync for ContentLane
impl Unpin for ContentLane
impl UnsafeUnpin for ContentLane
impl !UnwindSafe for ContentLane
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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