Skip to main content

IbridgeServer

Struct IbridgeServer 

Source
pub struct IbridgeServer<M, C = NoCalendar, K = NoContacts> { /* private fields */ }
Expand description

MCP server for one account.

At most four tool calls run at once. A read-only server omits write tools from the tool list and rejects a direct write call. Calendar and reminders tools appear once IbridgeServer::with_calendar gives the server a backend, and contacts tools once IbridgeServer::with_contacts does.

Implementations§

Source§

impl<M, C, K> IbridgeServer<M, C, K>
where M: MailApi + Send + Sync + 'static, C: CalendarProvider + RemindersProvider + Send + Sync + 'static, K: ContactsProvider + Send + Sync + 'static,

Source

pub fn calendar_list_calendars_tool_attr() -> Tool

Generated tool metadata function for calendar_list_calendars

Source

pub fn calendar_list_calendars( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Lists calendars and says whether each holds events, tasks or both.

§Errors

Returns an MCP error when the calendars cannot be read.

Source

pub fn calendar_list_events_tool_attr() -> Tool

Generated tool metadata function for calendar_list_events

Source

pub fn calendar_list_events( &self, Parameters: Parameters<ListEventsParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Lists events in a time range. Repeating events are expanded.

§Errors

Returns ErrorData::invalid_params when an id, the range or the page size is not usable, and an MCP error when the events cannot be read.

Source

pub fn calendar_get_event_tool_attr() -> Tool

Generated tool metadata function for calendar_get_event

Source

pub fn calendar_get_event( &self, Parameters: Parameters<GetByIdParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Fetches one event with its attendees and alarms.

§Errors

Returns ErrorData::invalid_params when the id is not usable, and an MCP error when the event cannot be read.

Source

pub fn calendar_create_event_tool_attr() -> Tool

Generated tool metadata function for calendar_create_event

Source

pub fn calendar_create_event( &self, Parameters: Parameters<CreateEventParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Creates an event. DTEND is always written.

§Errors

Returns ErrorData::invalid_params when the calendar id or a time is not usable, and an MCP error when the event cannot be written.

Source

pub fn calendar_update_event_tool_attr() -> Tool

Generated tool metadata function for calendar_update_event

Source

pub fn calendar_update_event( &self, Parameters: Parameters<UpdateEventParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Changes an event when its ETag still matches.

§Errors

Returns ErrorData::invalid_params when an id, ETag or time is not usable, and a tool error when the event changed since it was read.

Source

pub fn calendar_delete_event_tool_attr() -> Tool

Generated tool metadata function for calendar_delete_event

Source

pub fn calendar_delete_event( &self, Parameters: Parameters<DeleteParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Deletes an event when its ETag still matches.

§Errors

Returns ErrorData::invalid_params when the id or ETag is not usable, and a tool error when the event changed since it was read.

Source

pub fn reminders_list_lists_tool_attr() -> Tool

Generated tool metadata function for reminders_list_lists

Source

pub fn reminders_list_lists( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Lists reminder lists, and says that upgraded lists are out of reach.

§Errors

Returns an MCP error when the lists cannot be read.

Source

pub fn reminders_list_tool_attr() -> Tool

Generated tool metadata function for reminders_list

Source

pub fn reminders_list( &self, Parameters: Parameters<ListRemindersParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Lists reminders, open ones unless completed ones are asked for.

§Errors

Returns ErrorData::invalid_params when the list id or page size is not usable, and an MCP error when the reminders cannot be read.

Source

pub fn reminders_create_tool_attr() -> Tool

Generated tool metadata function for reminders_create

Source

pub fn reminders_create( &self, Parameters: Parameters<CreateReminderParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Creates a reminder in a task list.

§Errors

Returns ErrorData::invalid_params when the list id, due date or priority is not usable, and an MCP error when it cannot be written.

Source

pub fn reminders_update_tool_attr() -> Tool

Generated tool metadata function for reminders_update

Source

pub fn reminders_update( &self, Parameters: Parameters<UpdateReminderParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Changes a reminder when its ETag still matches. Completing is an update.

§Errors

Returns ErrorData::invalid_params when an id, ETag, due date or priority is not usable, and a tool error when the reminder changed.

Source

pub fn reminders_delete_tool_attr() -> Tool

Generated tool metadata function for reminders_delete

Source

pub fn reminders_delete( &self, Parameters: Parameters<DeleteParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Deletes a reminder when its ETag still matches.

§Errors

Returns ErrorData::invalid_params when the id or ETag is not usable, and a tool error when the reminder changed since it was read.

Source§

impl<M, C, K> IbridgeServer<M, C, K>
where M: MailApi + Send + Sync + 'static, C: CalendarProvider + RemindersProvider + Send + Sync + 'static, K: ContactsProvider + Send + Sync + 'static,

Source

pub fn contacts_search_tool_attr() -> Tool

Generated tool metadata function for contacts_search

Searches contacts by name, email address or phone number.

§Errors

Returns ErrorData::invalid_params when the query is empty or the limit is above 100, and an MCP error when the search cannot be run.

Source

pub fn contacts_get_tool_attr() -> Tool

Generated tool metadata function for contacts_get

Source

pub fn contacts_get( &self, Parameters: Parameters<GetByIdParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Fetches one contact in full.

§Errors

Returns ErrorData::invalid_params when the id is not usable, and an MCP error when the contact cannot be read.

Source

pub fn contacts_create_tool_attr() -> Tool

Generated tool metadata function for contacts_create

Source

pub fn contacts_create( &self, Parameters: Parameters<CreateContactParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Creates a contact.

§Errors

Returns ErrorData::invalid_params when the name is empty, and an MCP error when the contact cannot be written.

Source

pub fn contacts_update_tool_attr() -> Tool

Generated tool metadata function for contacts_update

Source

pub fn contacts_update( &self, Parameters: Parameters<UpdateContactParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Changes a contact. Needs the current ETag.

§Errors

Returns ErrorData::invalid_params when the id or etag is not usable, and an MCP error when the contact cannot be written.

Source

pub fn contacts_delete_tool_attr() -> Tool

Generated tool metadata function for contacts_delete

Source

pub fn contacts_delete( &self, Parameters: Parameters<DeleteParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Deletes a contact.

§Errors

Returns ErrorData::invalid_params when the id or etag is not usable, and an MCP error when the contact cannot be deleted.

Source

pub fn contacts_set_group_membership_tool_attr() -> Tool

Generated tool metadata function for contacts_set_group_membership

Source

pub fn contacts_set_group_membership( &self, Parameters: Parameters<SetGroupMembershipParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Adds a contact to a group or removes it.

§Errors

Returns ErrorData::invalid_params when an id or the action is not usable, and an MCP error when the group cannot be rewritten.

Source§

impl<M> IbridgeServer<M, NoCalendar, NoContacts>
where M: MailApi + Send + Sync + 'static,

Source

pub fn read_only(account: AccountSnapshot, mail: Arc<M>) -> Self

Hides write tools from the tool list and rejects write calls.

Source

pub fn read_write(account: AccountSnapshot, mail: Arc<M>) -> Self

Shows read and write tools.

Source§

impl<M, C, K> IbridgeServer<M, C, K>
where M: MailApi + Send + Sync + 'static, C: CalendarProvider + RemindersProvider + Send + Sync + 'static, K: ContactsProvider + Send + Sync + 'static,

Source

pub fn with_calendar<C2>(self, calendar: Arc<C2>) -> IbridgeServer<M, C2, K>
where C2: CalendarProvider + RemindersProvider + Send + Sync + 'static,

Shows the calendar and reminders tools, backed by calendar.

Source

pub fn with_contacts<K2>(self, contacts: Arc<K2>) -> IbridgeServer<M, C, K2>
where K2: ContactsProvider + Send + Sync + 'static,

Shows the contacts tools, backed by contacts.

Source

pub fn with_downloads(self, dir: PathBuf) -> Self

Shows mail_save_attachment, which saves files into dir.

Only the local run modes call this. A hosted server never writes to disk.

Source

pub fn without_contacts(self) -> Self

Hides every contacts tool.

Source

pub fn without_calendar(self) -> Self

Hides every calendar and reminders tool.

Source

pub fn without_mail(self) -> Self

Hides every mail tool. account_status stays.

Source

pub const fn is_read_only(&self) -> bool

Whether write tools are hidden.

Source

pub fn tools(&self) -> Vec<Tool>

Tools visible to the client, sorted by name.

Source§

impl<M, C, K> IbridgeServer<M, C, K>
where M: MailApi + Send + Sync + 'static, C: CalendarProvider + RemindersProvider + Send + Sync + 'static, K: ContactsProvider + Send + Sync + 'static,

Source

pub fn mail_list_mailboxes_tool_attr() -> Tool

Generated tool metadata function for mail_list_mailboxes

Source

pub fn mail_list_mailboxes( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Lists mailboxes with their roles and counts.

§Errors

Returns an MCP error when the mailbox list cannot be read.

Source

pub fn mail_search_tool_attr() -> Tool

Generated tool metadata function for mail_search

Searches messages, newest first.

§Errors

Returns ErrorData::invalid_params when the page size is above 100 or a filter is not usable, and an MCP error when the search cannot be run.

Source

pub fn mail_get_message_tool_attr() -> Tool

Generated tool metadata function for mail_get_message

Source

pub fn mail_get_message( &self, Parameters: Parameters<GetMessageParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Fetches one message, including its text and attachment list.

§Errors

Returns ErrorData::invalid_params when the id or offset is not usable, and an MCP error when the message cannot be read.

Source

pub fn mail_get_attachment_tool_attr() -> Tool

Generated tool metadata function for mail_get_attachment

Source

pub fn mail_get_attachment( &self, Parameters: Parameters<GetAttachmentParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Fetches one attachment as text or as a small inline file.

§Errors

Returns ErrorData::invalid_params when the id or offset is not usable, and an MCP error when the part cannot be read.

Source

pub fn mail_save_attachment_tool_attr() -> Tool

Generated tool metadata function for mail_save_attachment

Source

pub fn mail_save_attachment( &self, Parameters: Parameters<SaveAttachmentParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Saves one attachment into the download folder and returns its path.

§Errors

Returns ErrorData::invalid_params when the id is not usable, and an MCP error when the part cannot be read or the file cannot be written.

Source

pub fn mail_create_draft_tool_attr() -> Tool

Generated tool metadata function for mail_create_draft

Source

pub fn mail_create_draft( &self, Parameters: Parameters<SendParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Saves a draft in Drafts.

§Errors

Returns ErrorData::invalid_params when the draft is not usable, and an MCP error when the draft cannot be saved.

Source

pub fn mail_send_tool_attr() -> Tool

Generated tool metadata function for mail_send

Source

pub fn mail_send( &self, Parameters: Parameters<SendParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Sends a message and saves a copy in Sent Messages.

A failed Sent copy is a warning on a successful send, not a failed send.

§Errors

Returns ErrorData::invalid_params when the message is not usable, and an MCP error when SMTP refuses the message.

Source

pub fn mail_move_tool_attr() -> Tool

Generated tool metadata function for mail_move

Source

pub fn mail_move( &self, Parameters: Parameters<MoveParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Moves a message to a mailbox or a role.

§Errors

Returns ErrorData::invalid_params when the destination is not usable, and an MCP error when the move cannot be done.

Source

pub fn mail_set_flags_tool_attr() -> Tool

Generated tool metadata function for mail_set_flags

Source

pub fn mail_set_flags( &self, Parameters: Parameters<FlagParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Sets or clears seen and flagged. The same call again changes nothing.

§Errors

Returns ErrorData::invalid_params when the id is not usable, and an MCP error when the flags cannot be stored.

Source

pub fn account_status_tool_attr() -> Tool

Generated tool metadata function for account_status

Source

pub fn account_status( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ErrorData>> + Send + '_>>

Reports the signed-in address, each service, and the server version.

§Errors

Returns an MCP error when the status cannot be built.

Trait Implementations§

Source§

impl<M, C, K> Clone for IbridgeServer<M, C, K>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<M, C, K> Debug for IbridgeServer<M, C, K>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M, C, K> ServerHandler for IbridgeServer<M, C, K>
where M: MailApi + Send + Sync + 'static, C: CalendarProvider + RemindersProvider + Send + Sync + 'static, K: ContactsProvider + Send + Sync + 'static,

Source§

async fn call_tool( &self, request: CallToolRequestParams, context: RequestContext<RoleServer>, ) -> Result<CallToolResponse, ErrorData>

Handle a tools/call request from a client. Read more
Source§

async fn list_tools( &self, _request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> Result<ListToolsResult, ErrorData>

Source§

fn get_tool(&self, name: &str) -> Option<Tool>

Get a tool definition by name. Read more
Source§

fn get_info(&self) -> ServerConfig

Source§

fn ping( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture

Source§

fn initialize( &self, request: InitializeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<InitializeResult, ErrorData>> + MaybeSendFuture

Source§

fn negotiate_initialize( &self, request: &InitializeRequestParams, ) -> Result<InitializeResult, ErrorData>

Build the initialize response for request, negotiating the protocol version against Self::supported_protocol_versions. Read more
Source§

fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>

Return the protocol versions supported by this server. Read more
Source§

fn discover( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<DiscoverResult, ErrorData>> + MaybeSendFuture

Return this server’s discovery information.
Source§

fn complete( &self, request: CompleteRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CompleteResult, ErrorData>> + MaybeSendFuture

Source§

fn set_level( &self, request: SetLevelRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture

Source§

fn get_prompt( &self, request: GetPromptRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetPromptResponse, ErrorData>> + MaybeSendFuture

Source§

fn list_prompts( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListPromptsResult, ErrorData>> + MaybeSendFuture

Source§

fn list_resources( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourcesResult, ErrorData>> + MaybeSendFuture

Source§

fn list_resource_templates( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourceTemplatesResult, ErrorData>> + MaybeSendFuture

Source§

fn read_resource( &self, request: ReadResourceRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ReadResourceResponse, ErrorData>> + MaybeSendFuture

Source§

fn accepted_subscription_filter( &self, requested: &SubscriptionFilter, ) -> Option<SubscriptionFilter>

Return the subset of a requested notification filter this server accepts. Read more
Source§

fn listen( &self, context: SubscriptionContext, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture

Run one established subscription until it is cancelled or closed gracefully. Read more
Source§

fn subscribe( &self, request: SubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture

👎Deprecated:

resources/subscribe is legacy-only; implement accepted_subscription_filter and listen for protocol version 2026-07-28

Source§

fn unsubscribe( &self, request: UnsubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture

👎Deprecated:

resources/unsubscribe is legacy-only; subscriptions/listen is cancelled through its request lifecycle

Source§

fn on_custom_request( &self, request: CustomRequest, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CustomResult, ErrorData>> + MaybeSendFuture

Source§

fn on_cancelled( &self, notification: CancelledNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture

Source§

fn on_progress( &self, notification: ProgressNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture

Source§

fn on_initialized( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture

Source§

fn on_roots_list_changed( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture

Source§

fn on_custom_notification( &self, notification: CustomNotification, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture

Source§

fn get_task( &self, request: GetTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture

SEP-2663 tasks/get: return the current DetailedTask state.
Source§

fn update_task( &self, request: UpdateTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture

SEP-2663 tasks/update: accept responses to outstanding in-task input requests. Returns an empty acknowledgement on success.
Source§

fn cancel_task( &self, request: CancelTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture

SEP-2663 tasks/cancel: cooperative cancellation. Returns an empty acknowledgement; the task’s observable status may lag.
Source§

fn list_skills( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListSkillsResult, ErrorData>> + MaybeSendFuture

SEP-2640 skills/list: one page of the skills this server serves.
Source§

fn get_skill( &self, request: GetSkillRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetSkillResult, ErrorData>> + MaybeSendFuture

SEP-2640 skills/get: the entry for one skill, or -32602 when the server does not serve a skill at that URI.
Source§

fn read_resource_directory( &self, request: ReadResourceDirectoryRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourcesResult, ErrorData>> + MaybeSendFuture

SEP-2640 resources/directory/read: the direct children of a directory resource, or -32602 when the URI is not a directory.

Auto Trait Implementations§

§

impl<M, C = NoCalendar, K = NoContacts> !RefUnwindSafe for IbridgeServer<M, C, K>

§

impl<M, C = NoCalendar, K = NoContacts> !UnwindSafe for IbridgeServer<M, C, K>

§

impl<M, C, K> Forget for IbridgeServer<M, C, K>

§

impl<M, C, K> Freeze for IbridgeServer<M, C, K>
where Arc<M>: Freeze, Arc<C>: Freeze, Arc<K>: Freeze, ToolRouter<IbridgeServer<M, C, K>>: Freeze,

§

impl<M, C, K> Move for IbridgeServer<M, C, K>

§

impl<M, C, K> Send for IbridgeServer<M, C, K>
where Arc<M>: Send, Arc<C>: Send, Arc<K>: Send, ToolRouter<IbridgeServer<M, C, K>>: Send,

§

impl<M, C, K> Sync for IbridgeServer<M, C, K>
where Arc<M>: Sync, Arc<C>: Sync, Arc<K>: Sync, ToolRouter<IbridgeServer<M, C, K>>: Sync,

§

impl<M, C, K> Unpin for IbridgeServer<M, C, K>
where Arc<M>: Unpin, Arc<C>: Unpin, Arc<K>: Unpin, ToolRouter<IbridgeServer<M, C, K>>: Unpin,

§

impl<M, C, K> UnsafeUnpin for IbridgeServer<M, C, K>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<R, S> DynService<R> for S
where R: ServiceRole, S: Service<R>,

Source§

fn handle_request( &self, request: <R as ServiceRole>::PeerReq, context: RequestContext<R>, ) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>

Source§

fn handle_notification( &self, notification: <R as ServiceRole>::PeerNot, context: NotificationContext<R>, ) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>

Source§

fn get_info(&self) -> <R as ServiceRole>::Info

Source§

fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<H> Service<RoleServer> for H
where H: ServerHandler,

Source§

async fn handle_request( &self, request: <RoleServer as ServiceRole>::PeerReq, context: RequestContext<RoleServer>, ) -> Result<<RoleServer as ServiceRole>::Resp, ErrorData>

Source§

async fn handle_notification( &self, notification: <RoleServer as ServiceRole>::PeerNot, context: NotificationContext<RoleServer>, ) -> Result<(), ErrorData>

Source§

fn get_info(&self) -> <RoleServer as ServiceRole>::Info

Source§

fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>

The protocol versions this service can speak, bounding what initialize negotiation may agree to. Read more
Source§

impl<S> ServiceExt<RoleServer> for S
where S: Service<RoleServer>,

Source§

fn serve_with_ct<T, E, A>( self, transport: T, ct: CancellationToken, ) -> impl Future<Output = Result<RunningService<RoleServer, S>, ServerInitializeError>> + MaybeSendFuture
where T: IntoTransport<RoleServer, E, A>, E: Error + Send + Sync + 'static, S: Sized,

Initialize and run the service with the supplied cancellation token. Read more
Source§

fn into_dyn(self) -> Box<dyn DynService<R>>

Convert this service to a dynamic boxed service Read more
Source§

fn serve<T, E, A>( self, transport: T, ) -> impl Future<Output = Result<RunningService<R, Self>, <R as ServiceRole>::InitializeError>> + MaybeSendFuture
where T: IntoTransport<R, E, A>, E: Error + Send + Sync + 'static, Self: Sized,

Initialize the protocol over transport and return a running service. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more