pub struct ProtocolPath {
pub semantics: ProtocolPathSemantics,
pub value: String,
}Expand description
Path string paired with explicit machine and root semantics.
Fields§
§semantics: ProtocolPathSemanticsHow the path must be resolved.
value: StringUTF-8 path or URI text.
Implementations§
Source§impl ProtocolPath
impl ProtocolPath
Sourcepub fn new(
semantics: ProtocolPathSemantics,
value: impl Into<String>,
) -> RemoteBuildResult<Self>
pub fn new( semantics: ProtocolPathSemantics, value: impl Into<String>, ) -> RemoteBuildResult<Self>
Construct and validate a protocol path.
§Errors
Returns a typed validation error for unsafe or inconsistent path text.
Sourcepub fn validate(&self) -> RemoteBuildResult<()>
pub fn validate(&self) -> RemoteBuildResult<()>
Validate lexical path safety without touching the filesystem.
§Errors
Returns a typed validation error for traversal, credentials, or incorrect semantics.
Trait Implementations§
Source§impl Clone for ProtocolPath
impl Clone for ProtocolPath
Source§impl Debug for ProtocolPath
impl Debug for ProtocolPath
Source§impl<'de> Deserialize<'de> for ProtocolPath
impl<'de> Deserialize<'de> for ProtocolPath
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
impl Eq for ProtocolPath
Source§impl JsonSchema for ProtocolPath
impl JsonSchema for ProtocolPath
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ProtocolPath
impl PartialEq for ProtocolPath
Source§impl Serialize for ProtocolPath
impl Serialize for ProtocolPath
impl StructuralPartialEq for ProtocolPath
Auto Trait Implementations§
impl Freeze for ProtocolPath
impl RefUnwindSafe for ProtocolPath
impl Send for ProtocolPath
impl Sync for ProtocolPath
impl Unpin for ProtocolPath
impl UnsafeUnpin for ProtocolPath
impl UnwindSafe for ProtocolPath
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.