pub struct Context {
pub bytes: Vec<u8>,
}
Expand description
A component resolution context, used when resolving component URLs relative
to another component. The context is stored in a byte array that persists a
value used by the target Resolver
to locate and resolve a component by
relative path (for example, by a subpackage name).
Fields§
§bytes: Vec<u8>
Trait Implementations§
Source§impl Encodable for Context
impl Encodable for Context
Source§type Encoded = WireContext
type Encoded = WireContext
The wire type for the value.
§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
encoding instead of calling
encode
. Read moreSource§impl EncodableOption for Box<Context>
impl EncodableOption for Box<Context>
Source§type EncodedOption = WireBox<WireContext>
type EncodedOption = WireBox<WireContext>
The wire type for the optional value.
Source§impl<___E> EncodeOption<___E> for Box<Context>
impl<___E> EncodeOption<___E> for Box<Context>
Source§fn encode_option(
this: Option<&mut Self>,
encoder: &mut ___E,
out: &mut MaybeUninit<Self::EncodedOption>,
) -> Result<(), EncodeError>
fn encode_option( this: Option<&mut Self>, encoder: &mut ___E, out: &mut MaybeUninit<Self::EncodedOption>, ) -> Result<(), EncodeError>
Encodes this optional value into an encoder and output.
Source§impl TakeFrom<WireContext> for Context
impl TakeFrom<WireContext> for Context
Source§fn take_from(from: &WireContext) -> Self
fn take_from(from: &WireContext) -> Self
Converts from the given
T
, taking any resources that can’t be cloned.§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
conversion instead of calling
take_from
. Read moreAuto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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