pub struct ProtoFile {
pub name: String,
pub content: String,
pub path: Option<String>,
}Expand description
Simplified proto file representation for convenience (adapts from actr_protocol::service_spec::Protobuf)
Fields§
§name: StringFile name (e.g., “user.proto”)
content: StringProto file content
path: Option<String>Optional file path (for local development)
Implementations§
Source§impl ProtoFile
impl ProtoFile
Sourcepub fn name_from_uri(uri: &str) -> String
pub fn name_from_uri(uri: &str) -> String
Extract filename from URI or path e.g., “actr://service/proto/user.proto” → “user.proto” Used for compatibility with old URI-based references
Sourcepub fn from_protobuf(proto: &Protobuf) -> Self
pub fn from_protobuf(proto: &Protobuf) -> Self
Create from protocol Protobuf message (package-level) The Protobuf structure represents a merged package, so we use package name directly
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProtoFile
impl<'de> Deserialize<'de> for ProtoFile
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 ProtoFile
impl StructuralPartialEq for ProtoFile
Auto Trait Implementations§
impl Freeze for ProtoFile
impl RefUnwindSafe for ProtoFile
impl Send for ProtoFile
impl Sync for ProtoFile
impl Unpin for ProtoFile
impl UnwindSafe for ProtoFile
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,
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.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>
Converts
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>
Converts
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