pub struct PathDecl {
pub n: u8,
pub paths: PathDeclPaths,
}Expand description
A path declaration: key count n plus either a shared origin path or
n divergent origin paths (mode selected by header bit 4).
Fields§
§n: u8Key count, 1..=32 (encoded on the wire as n - 1 in 5 bits).
paths: PathDeclPathsPath payload — shared (single path) or divergent (one per key).
Implementations§
Source§impl PathDecl
impl PathDecl
Sourcepub fn write(&self, w: &mut BitWriter) -> Result<(), Error>
pub fn write(&self, w: &mut BitWriter) -> Result<(), Error>
Encode this PathDecl into w. The mode (shared vs divergent) is
determined by self.paths; the caller is responsible for setting
header bit 4 to match.
§Errors
Error::KeyCountOutOfRangeifself.nis outside1..=32.Error::DivergentPathCountMismatchifself.pathsisDivergentand the vector length does not equalself.n.Error::PathDepthExceededpropagated from a component’s path encoder if any contained path exceedsMAX_PATH_COMPONENTS.
Trait Implementations§
impl Eq for PathDecl
impl StructuralPartialEq for PathDecl
Auto Trait Implementations§
impl Freeze for PathDecl
impl RefUnwindSafe for PathDecl
impl Send for PathDecl
impl Sync for PathDecl
impl Unpin for PathDecl
impl UnsafeUnpin for PathDecl
impl UnwindSafe for PathDecl
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